/*
 MFA COMMON STYLESHEET — consolidated V55 visual language candidate v1

 Source basis:
   - gallery(4).css: balanced V55 common stylesheet foundation supplied by user.
   - gallery_working_movie_index.css: retained movie-index and photograph-grid rules,
     with malformed/redundant wrapper braces corrected rather than copied verbatim.
   - Current V55 slideshow renderer contract: slideshow-shell/stage/frame/controls/
     thumbs/help/back classes.

 Development candidate only. No production files are modified by creation of this file.
*/

:root { color-scheme:dark; --bg:#0b0d10; --surface:#141820; --text:#f4f6f8; --muted:#9da7b3; --accent:#8fb8ff; --red:#d00000; --border:rgba(255,255,255,.10); --radius:16px; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:radial-gradient(circle at 50% -10%, rgba(143,184,255,.12), transparent 36rem),var(--bg); color:var(--text); font:16px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
a { color:var(--accent); }
.site-shell { width:min(1400px,calc(100% - 32px)); margin:0 auto; }
.site-banner { position:relative; display:grid; grid-template-columns:minmax(130px,.7fr) minmax(360px,2.6fr) minmax(150px,.8fr); min-height:190px; margin:0 0 28px; overflow:hidden; border:1px solid var(--red); background:linear-gradient(135deg,#07090c 0%,#101923 48%,#080a0d 100%); }
.site-banner::before { content:"MFAW"; position:absolute; left:13%; top:-55px; font-size:clamp(10rem,22vw,20rem); line-height:1; font-weight:900; letter-spacing:-.09em; color:rgba(143,184,255,.055); pointer-events:none; white-space:nowrap; }
.banner-side { position:relative; z-index:1; display:flex; flex-direction:column; justify-content:center; padding:22px 24px; color:rgba(244,246,248,.62); text-transform:uppercase; letter-spacing:.24em; font-size:.72rem; }
.banner-side.left { border-right:1px solid rgba(208,0,0,.55); }
.banner-side.right { border-left:1px solid rgba(208,0,0,.55); align-items:flex-start; }
.banner-side .side-line { margin:4px 0; }
.banner-tagline { position:relative; z-index:1; align-self:center; padding:12px 18px; text-align:center; }
.banner-title { margin:0; font-size:clamp(2rem,5vw,4.2rem); line-height:1; font-weight:800; letter-spacing:.035em; white-space:nowrap; }
.banner-title .red { color:#e00018; }
.banner-rule { width:78%; height:3px; margin:15px auto 13px; background:linear-gradient(90deg,transparent,var(--red),transparent); }
.banner-subtitle { margin:0; color:#c5d7ee; text-transform:uppercase; letter-spacing:.28em; font-size:clamp(.72rem,1.4vw,1rem); font-weight:600; }
.banner-nav { position:relative; z-index:2; display:flex; flex-direction:column; gap:9px; width:100%; }
.banner-nav a { color:#b8d4f5; text-decoration:none; font-weight:700; letter-spacing:.10em; transition:color .18s ease,transform .18s ease; }
.banner-nav a:hover,.banner-nav a:focus-visible { color:#fff; transform:translateX(3px); }
.banner-nav a::before { content:""; display:inline-block; width:6px; height:6px; margin:0 10px 2px 0; border-radius:50%; background:var(--red); opacity:.8; }
.hero { padding:0 0 28px; }
.eyebrow { margin:0 0 8px; color:var(--accent); text-transform:uppercase; letter-spacing:.12em; font-size:1.56rem; font-weight:700; }
h1 { margin:0; font-size:clamp(2rem,5vw,3.5rem); line-height:1.05; }
.lede { max-width:70ch; color:var(--muted); }
.gallery-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr)); gap:16px; }
.gallery-card { position:relative; display:block; overflow:hidden; border-radius:var(--radius); background:var(--surface); border:1px solid var(--border); text-decoration:none; aspect-ratio:4/3; transition:transform .18s ease,border-color .18s ease; }
.gallery-card:hover { transform:translateY(-2px); border-color:rgba(143,184,255,.45); }
.gallery-card img { width:100%; height:100%; object-fit:contain; object-position:center center; display:block; border:3.5px solid var(--red); box-sizing:border-box; background:#000; }
.gallery-card figcaption { position:absolute; left:0; right:0; bottom:0; padding:36px 12px 11px; background:linear-gradient(transparent,rgba(0,0,0,.78)); color:#fff; font-size:.82rem; opacity:0; transition:opacity .18s ease; }
.gallery-card:hover figcaption,.gallery-card:focus-visible figcaption { opacity:1; }
.meta-row { display:flex; gap:12px; flex-wrap:wrap; color:var(--muted); font-size:.92rem; }
.section { margin-top:44px; padding-top:28px; border-top:1px solid var(--border); }
.comment-list { display:grid; gap:12px; }
.comment { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:16px; }
.index-description { margin:5px 0 2px 20px; color:var(--muted); }
.index-count { margin-left:20px; color:var(--muted); font-size:.92rem; }
.comment-meta { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:7px; }
.comment-date { color:var(--muted); }
.comment-body { white-space:pre-wrap; }
.empty { color:var(--muted); }

/* Legacy slideshow compatibility. Retained for older generated content. */
.slideshow { text-align:center; }
.slideshow figure { margin:24px auto; max-width:1400px; }
.slideshow img { max-width:100%; max-height:82vh; height:auto; border-radius:12px; }

.footer { padding:44px 0; color:var(--muted); font-size:.85rem; }

@media (max-width:820px) {
  .site-banner { grid-template-columns:1fr; min-height:0; }
  .banner-side.left { display:none; }
  .banner-side.right { border-left:0; border-top:1px solid rgba(208,0,0,.55); padding:14px 18px; }
  .banner-nav { flex-direction:row; justify-content:center; flex-wrap:wrap; gap:8px 16px; }
  .banner-nav a::before { display:none; }
  .banner-title { white-space:normal; }
}
@media (max-width:640px) {
  .site-shell{width:min(100% - 20px,1400px);}
  .banner-tagline { padding:22px 12px; }
  .banner-subtitle { letter-spacing:.16em; }
  .gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
  .gallery-card{border-radius:10px;}
}

/* V55 slideshow presentation contract. */
.slideshow-shell {
  width:100%;
  margin:0;
  padding:0 0 44px;
  text-align:center;
}
.slideshow-stage {
  width:100%;
  min-height:0;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.slideshow-frame {
  width:100%;
  max-width:1400px;
  margin:0 auto;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.slideshow-frame[hidden] { display:none; }
.slideshow-frame a {
  display:block;
  width:100%;
  max-width:100%;
  text-decoration:none;
}
.slideshow-frame img {
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  max-height:72vh;
  margin:0 auto;
  object-fit:contain;
  border-radius:12px;
}
.slideshow-controls {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:18px auto 0;
}
.slideshow-controls button {
  display:inline-block;
  padding:9px 14px;
  border:1px solid rgba(143,184,255,.34);
  border-radius:8px;
  color:var(--accent);
  background:rgba(143,184,255,.06);
  font:inherit;
  font-weight:700;
  line-height:1.2;
  cursor:pointer;
}
.slideshow-controls button:hover,
.slideshow-controls button:focus-visible {
  color:#fff;
  border-color:rgba(143,184,255,.68);
  background:rgba(143,184,255,.12);
}
.slideshow-counter {
  min-width:5rem;
  color:var(--muted);
  font-size:.9rem;
  font-weight:700;
  text-align:center;
}
.slideshow-thumbs {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px;
  max-width:1400px;
  margin:18px auto 0;
}
.slideshow-thumbs a {
  display:block;
  flex:0 0 auto;
  width:76px;
  height:58px;
  padding:3px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:7px;
  background:rgba(20,24,32,.72);
  text-decoration:none;
  opacity:.68;
  transition:opacity .18s ease,border-color .18s ease,transform .18s ease;
}
.slideshow-thumbs a:hover,
.slideshow-thumbs a:focus-visible,
.slideshow-thumbs a.current {
  opacity:1;
  border-color:rgba(143,184,255,.68);
}
.slideshow-thumbs a.current { transform:translateY(-1px); }
.slideshow-thumbs img {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center center;
  background:#000;
  border-radius:4px;
}
.slideshow-help {
  margin:12px 0 0;
  color:var(--muted);
  font-size:.78rem;
}
.slideshow-back {
  margin:18px 0 0;
}
@media (max-width:760px) {
  .slideshow-frame img { max-height:65vh; border-radius:8px; }
  .slideshow-controls { gap:8px; }
  .slideshow-thumbs a { width:64px; height:49px; }
}

/* COMMON PHOTOGRAPH GRID/CARD CONTRACT retained from the working Movie Index CSS. */
.photo-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.photo-card { min-width:0; padding:8px; background:linear-gradient(145deg,rgba(20,24,32,.96),rgba(14,18,24,.96)); border:1px solid var(--border); border-radius:12px; }
.photo-card img { display:block; width:100%; aspect-ratio:4 / 3; height:auto; object-fit:contain; object-position:center center; border:3.5px solid var(--red); border-radius:8px; box-sizing:border-box; background:#000; }
.photo-card a { text-decoration:none; }
@media (max-width:1100px) { .photo-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:900px) { .photo-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:600px) { .photo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; } .photo-card { padding:5px; } }
@media (max-width:420px) { .photo-grid { grid-template-columns:repeat(1,minmax(0,1fr)); } }

/* Category compatibility alias retained from the working Movie Index CSS. */
.image-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.image-card { min-width:0; padding:8px; background:linear-gradient(145deg,rgba(20,24,32,.96),rgba(14,18,24,.96)); border:1px solid var(--border); border-radius:12px; }
.image-card img { display:block; width:100%; aspect-ratio:4 / 3; height:auto; object-fit:contain; object-position:center center; border:3.5px solid var(--red); border-radius:8px; box-sizing:border-box; background:#000; }
@media (max-width:1100px) { .image-grid{grid-template-columns:repeat(5,minmax(100px,1fr));} }
@media (max-width:900px) { .image-grid{grid-template-columns:repeat(4,minmax(90px,1fr));} }
@media (max-width:600px) { .image-grid{grid-template-columns:repeat(3,minmax(75px,1fr));gap:9px;} .image-card{padding:5px;} }
@media (max-width:420px) { .image-grid{grid-template-columns:repeat(2,minmax(90px,1fr));} }

/* V55 canonical component styles */
.mfa-v55-action-section {
  margin: 4px 0 82px !important;
  padding: 16px 20px;
  display: flow-root;
  border: 1px solid rgba(143,184,255,.24);
  border-radius: 12px;
  background: rgba(20,24,32,.72);
}
.mfa-v55-action-label { margin:0 0 12px; text-align:center; color:var(--muted); font-size:.76rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.mfa-v55-action-links { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:center; }
.mfa-v55-action-button { display:inline-block; padding:9px 14px; border:1px solid rgba(143,184,255,.34); border-radius:8px; color:var(--accent); background:rgba(143,184,255,.06); text-decoration:none; font:inherit; font-weight:700; line-height:1.2; cursor:pointer; box-sizing:border-box; }
.mfa-v55-action-button:hover,.mfa-v55-action-button:focus-visible { color:#fff; border-color:rgba(143,184,255,.68); background:rgba(143,184,255,.12); }
.mfa-v55-action-button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.mfa-v55-action-links a { text-decoration:none; }
.latest-year-return-top { width:100%; justify-content:center; }
.mfa-v55-context-form { margin:38px 0 0; padding:28px; border:1px solid var(--border); border-radius:var(--radius); background:rgba(20,24,32,.72); }
.mfa-v55-context-form h2 { margin:8px 0 8px; font-size:1.35rem; }
.mfa-v55-form-target { display:inline-block; padding:5px 9px; border:1px solid rgba(143,184,255,.30); border-radius:999px; color:var(--accent); font-size:.78rem; font-weight:700; letter-spacing:.02em; }
.mfa-v55-form-note { margin:0 0 22px; color:var(--muted); font-size:.92rem; }
.mfa-v55-form-row { margin:0 0 18px; }
.mfa-v55-context-form label { display:block; margin:0 0 7px; font-weight:700; }
.mfa-v55-context-form input[type="text"],.mfa-v55-context-form textarea { display:block; width:min(100%,760px); padding:12px 14px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--text); font:inherit; }
.mfa-v55-context-form textarea { min-height:150px; resize:vertical; }
.mfa-v55-context-form input:focus-visible,.mfa-v55-context-form textarea:focus-visible,.mfa-v55-context-form button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.mfa-v55-form-help { margin:6px 0 0; color:var(--muted); font-size:.82rem; }
.mfa-v55-context-form button { border:0; border-radius:10px; padding:11px 18px; background:var(--accent); color:#081019; font:inherit; font-weight:800; cursor:pointer; }
.mfa-v55-top-button { display:inline-block; margin-left:8px; padding:10px 18px; border:1px solid rgba(143,184,255,.42); border-radius:10px; color:var(--accent); background:rgba(143,184,255,.06); font:inherit; font-weight:800; line-height:1.2; text-decoration:none; vertical-align:middle; }
.mfa-v55-top-button:hover,.mfa-v55-top-button:focus-visible { color:#fff; border-color:rgba(143,184,255,.68); background:rgba(143,184,255,.12); }
@media (max-width:700px) { .mfa-v55-action-section { padding:14px 16px; } .mfa-v55-action-links { gap:8px; } .mfa-v55-form-actions { flex-wrap:wrap; } .mfa-v55-context-form { padding:20px; } }

/* Common V55 page typography */
.mfa-page-title {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: .02em;
}

.mfa-section-title {
  margin: 30px 0 12px;
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: .02em;
}

.mfa-page-intro {
  margin: 0 0 18px;
  color: #c5d7ee;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.55;
}

/* V55 Stage 2/3 comments — common visual language */
.mfa-v55-stage2c-comments,
.mfa-v55-stage3-comments {
  margin: 44px 0 36px !important;
  padding: 24px 0 0 !important;
  border-top: 1px solid var(--border);
}

.mfa-v55-stage2c-comments h2,
.mfa-v55-stage3-comments h2 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: .03em;
}

.mfa-v55-comments-loading {
  color: var(--muted);
  opacity: .82;
}

.mfa-v55-comments-source {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .88rem;
}

.mfa-v55-comment {
  margin: 0 0 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 3.5px solid var(--red);
  border-radius: 10px;
  background: var(--surface);
}

.mfa-v55-comment-meta {
  margin-bottom: 7px;
  line-height: 1.35;
}

.mfa-v55-comment-date {
  margin-left: 8px;
  color: var(--muted);
  font-size: .82rem;
}

.mfa-v55-comment-body {
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.55;
}

.mfa-v55-comment-id {
  margin-top: 10px;
  color: var(--muted);
  opacity: .65;
  font-size: .72rem;
}

.mfa-v55-comment-form {
  margin: 32px 0 0 !important;
  padding: 24px 0 8px !important;
  border-top: 1px solid var(--border);
}

.mfa-v55-comment-form-inner {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.mfa-v55-gallery-badge {
  display: inline-block;
  padding: 7px 11px;
  border: 1px solid rgba(143,184,255,.45);
  border-radius: 999px;
  font-size: .78rem;
  color: var(--accent);
  letter-spacing: .04em;
}

.mfa-v55-comment-form h2 {
  margin: 14px 0 8px;
}

.mfa-v55-comment-form label {
  display: block;
  margin: 18px 0 7px;
  font-weight: 700;
}

.mfa-v55-comment-form input,
.mfa-v55-comment-form textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: inherit;
  font: inherit;
}

.mfa-v55-form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.mfa-v55-form-actions button:not(.mfa-v55-action-button) {
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #07101d;
  font-weight: 800;
  font: inherit;
}

.mfa-v55-secondary-button {
  display: inline-block;
  padding: 10px 15px;
  border: 1px solid rgba(143,184,255,.45);
  border-radius: 10px;
  color: var(--accent);
  background: transparent;
  text-decoration: none;
  font-weight: 700;
}

.mfa-v55-secondary-button:hover,
.mfa-v55-secondary-button:focus-visible {
  color: #07101d;
  background: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.banner-home-link { display:block; color:inherit; text-decoration:none; }
.banner-home-link:hover,.banner-home-link:focus-visible { color:inherit; text-decoration:none; }
.banner-home-link:focus-visible { outline:2px solid var(--accent); outline-offset:6px; border-radius:8px; }

/* Category-specific presentation, centralized here rather than inline. */
.mfa-category-card{min-width:0;text-align:center}
.mfa-category-source-gallery{display:inline-block;margin:8px 0 0;color:var(--accent);font-size:.72rem;font-weight:700;letter-spacing:.03em;line-height:1.2;text-decoration:none;opacity:.9}
.mfa-category-source-gallery:hover,.mfa-category-source-gallery:focus-visible{color:#fff;text-decoration:underline;text-underline-offset:3px;opacity:1}

/* Category pagination — common shared stylesheet */
.mfa-category-pagination { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:.35rem .5rem; margin:.55rem 0 0; padding:.35rem 0 0; font-size:.78rem; line-height:1.5; }
.mfa-category-pagination-label { color:var(--muted); font-weight:700; letter-spacing:.03em; }
.mfa-category-page-link,.mfa-category-page-current { display:inline-block; min-width:1.55rem; padding:.12rem .38rem; border:1px solid rgba(143,184,255,.45); border-radius:4px; text-align:center; text-decoration:none; font-weight:700; }
.mfa-category-page-link { color:var(--accent); }
.mfa-category-page-link:hover,.mfa-category-page-link:focus-visible { color:#07101d; background:var(--accent); border-color:var(--accent); text-decoration:none; }
.mfa-category-page-current { color:#07101d; background:var(--accent); border-color:var(--accent); }
.mfa-category-bottom-nav { width:100%; margin:0; padding:0 0 2.5rem; text-align:center; }
.mfa-category-bottom-navigation { width:100%; margin:0; padding:0; text-align:center; }
.mfa-category-bottom-pagination { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:.55rem; margin:.55rem 0 0; }
.mfa-category-bottom-pagination .mfa-category-bottom-link { min-width:auto; padding:.45rem .75rem; }

/* Movie Index Play-state extensions: V16/V18 */
.movie-play--available { }
.movie-play--pending { cursor:default; opacity:.55; text-decoration:none; pointer-events:none; }
.movie-status.pending { display:inline-block; margin-left:2px; color:var(--muted); font-size:.74rem; font-weight:700; letter-spacing:.03em; white-space:nowrap; }
.movie-selection { display:grid; gap:8px; }
.movie-row { display:grid; grid-template-columns:minmax(210px,.72fr) minmax(310px,1.35fr) minmax(0,1.9fr) 100px; gap:20px; align-items:center; padding:16px 18px; border-radius:12px; background:#141820; border:1px solid rgba(255,255,255,.08); border-left:3.5px solid var(--red); }
.movie-row:hover { border-color:rgba(143,184,255,.24); border-left-color:var(--red); }
.movie-main { min-width:0; }
.movie-title { display:inline; font-weight:800; line-height:1.4; color:#edf1f5; }
.movie-description { min-width:0; color:#c4cbd3; line-height:1.45; }
.movie-size { color:#aeb7c2; text-align:right; white-space:nowrap; font-weight:700; }
.movie-actions-cell { min-width:0; display:flex; flex-wrap:nowrap; align-items:center; justify-content:flex-start; gap:10px; white-space:nowrap; }
.movie-actions-cell.mfa-v55-action-links { justify-content:flex-start; }
.movie-actions-cell .movie-action { display:inline-block; padding:9px 14px; border:1px solid rgba(143,184,255,.34); border-radius:8px; color:var(--accent); background:rgba(143,184,255,.06); text-decoration:none; font-weight:700; line-height:1.2; }
.movie-actions-cell .movie-action:hover,.movie-actions-cell .movie-action:focus-visible { color:#fff; border-color:rgba(143,184,255,.68); background:rgba(143,184,255,.12); }
.movie-actions-cell .movie-play--pending { color:#8f99a5; border-color:rgba(143,153,165,.22); background:rgba(143,153,165,.04); pointer-events:none; }
.movie-actions-cell .movie-status.pending { margin-left:0; }
/* Movie Index pending Play/status placement — candidate v5.
   Keep Download, greyed Play, and migration status on one row in that order. */
.movie-play-pending-group { display:inline-flex; flex-direction:row; align-items:center; gap:8px; flex:0 0 auto; }
.movie-play-pending-group .movie-status.pending { margin:0; padding-left:0; color:#8f99a5; font-size:.68rem; font-weight:700; letter-spacing:.03em; line-height:1.15; white-space:nowrap; text-transform:none; }
@media (max-width:760px) {
  .movie-row { grid-template-columns:1fr; gap:8px; }
  .movie-size { text-align:left; }
  .movie-actions-cell { justify-content:flex-start; }
}
.mfa-v55-comment-flash { margin:24px 0 0 !important; }


/* COMMON CATEGORY INDEX CONTRACT.
   Category Index uses the same page/banner language as Galleries and Movies.
   Each category is a compact row with the common red left accent. */
.category-index-content { min-width:0; }
.category-index-list {
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  width:100%;
  margin:24px 0 0;
  padding-bottom:2.5rem;
}
.category-card {
  display:grid;
  grid-template-columns:minmax(120px,max-content) minmax(0,1fr);
  align-items:center;
  column-gap:22px;
  min-height:54px;
  padding:10px 16px;
  background:var(--surface);
  border:1px solid var(--border);
  border-left:3.5px solid var(--red);
  border-radius:12px;
  color:var(--text);
  text-decoration:none;
  transition:transform .18s ease,border-color .18s ease,background .18s ease;
}
.category-card:hover,
.category-card:focus-visible {
  transform:translateY(-1px);
  border-color:rgba(143,184,255,.55);
  border-left-color:var(--red);
  background:#171c25;
}
.category-number {
  display:block;
  color:var(--muted);
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.10em;
  text-transform:uppercase;
  white-space:nowrap;
}
.category-name {
  display:block;
  color:var(--accent);
  font-size:1rem;
  font-weight:750;
  line-height:1.3;
}
.category-note {
  margin:16px 0 0;
  color:var(--muted);
  font-size:.9rem;
}
@media (max-width:640px) {
  .category-card {
    grid-template-columns:1fr;
    row-gap:3px;
    padding:10px 13px;
  }
}


/* Gallery Index presentation contract — restored from the previously validated Gallery Index visual design.
   Shared CSS only; no inline Gallery Index styling is required. */
.site-stats {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  max-width:760px;
  margin:0 auto 28px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(20,24,32,.72);
  overflow:hidden;
}
.site-stat {
  padding:18px 22px;
  text-align:center;
}
.site-stat + .site-stat {
  border-left:1px solid var(--border);
}
.site-stat-value {
  display:block;
  color:var(--text);
  font-size:clamp(1.8rem,4vw,2.8rem);
  line-height:1;
  font-weight:850;
  letter-spacing:-.035em;
}
.site-stat-label {
  display:block;
  margin-top:7px;
  color:var(--accent);
  font-size:.74rem;
  font-weight:750;
  text-transform:uppercase;
  letter-spacing:.15em;
}
/* Gallery Index collection statement — emphasized while retaining the common visual language. */
.site-stat-note {
  max-width:820px;
  margin:0 auto 28px;
  padding:8px 18px 10px;
  text-align:center;
  color:#c5d7ee;
  font-size:1.12rem;
  font-weight:600;
  line-height:1.5;
  letter-spacing:.025em;
  position:relative;
}
.site-stat-note::before,
.site-stat-note::after {
  content:"";
  display:inline-block;
  vertical-align:middle;
  width:42px;
  height:1px;
  margin:0 14px;
  background:rgba(208,0,0,.72);
}
.site-stat-note-accent {
  color:#8fb8ff;
  font-weight:800;
  letter-spacing:.035em;
}
.gallery-index-list {
  display:grid;
  grid-template-columns:1fr;
  gap:7px;
  width:100%;
  padding-bottom:2.5rem;
}
.gallery-index-row {
  display:grid;
  grid-template-columns:minmax(150px,220px) 1fr auto;
  align-items:center;
  column-gap:14px;
  row-gap:2px;
  width:100%;
  min-height:48px;
  padding:8px 14px;
  background:var(--surface);
  border:1px solid var(--border);
  border-left:3.5px solid var(--red);
  border-radius:12px;
  text-decoration:none;
  transition:transform .18s ease,border-color .18s ease,background .18s ease;
}
.gallery-index-row:hover,
.gallery-index-row:focus-visible {
  transform:translateY(-2px);
  border-color:rgba(143,184,255,.55);
  background:#171c25;
}
.gallery-index-title {
  display:block;
  color:var(--accent);
  font-size:1rem;
  font-weight:750;
  white-space:nowrap;
}
.gallery-index-description {
  display:block;
  color:var(--muted);
  min-width:0;
  overflow-wrap:anywhere;
}
.gallery-index-count {
  display:block;
  color:var(--muted);
  font-size:.86rem;
  white-space:nowrap;
  text-align:right;
}
@media (max-width:640px) {
  .site-stats {
    grid-template-columns:1fr;
    margin-bottom:22px;
  }
  .site-stat + .site-stat {
    border-left:0;
    border-top:1px solid var(--border);
  }
}
@media (max-width:820px) {
  .gallery-index-row {
    grid-template-columns:1fr;
    gap:5px;
  }
  .gallery-index-count {
    text-align:left;
  }
}
@media (max-width:640px) {
  .gallery-index-row {
    padding:15px;
  }
}

/* Latest Updates presentation — V7 common-architecture contract. */
.latest-content { max-width:1100px; margin:0 auto; padding:0 0 60px; }
.latest-content h1 { margin:0 0 10px; }
.latest-intro { margin:0 0 30px; color:var(--muted); }
.latest-month { margin:34px 0 0; padding-top:28px; border-top:1px solid var(--border); }
.latest-month h2 { margin:0 0 12px; font-size:1.35rem; }
.latest-list { display:grid; gap:7px; }
.latest-row { display:grid; grid-template-columns:minmax(130px,180px) minmax(0,1fr); gap:18px; align-items:center; min-height:48px; padding:10px 14px; background:var(--surface); border:1px solid var(--border); border-left:3.5px solid var(--red); border-radius:12px; transition:transform .18s ease,border-color .18s ease,background .18s ease; }
.latest-row:hover { transform:translateY(-1px); border-color:rgba(143,184,255,.55); background:#171c25; }
.latest-date { color:var(--muted); font-weight:700; white-space:nowrap; }
.latest-item { min-width:0; }
.latest-item a { color:var(--accent); text-decoration:none; font-weight:750; overflow-wrap:anywhere; }
.latest-item a:hover,.latest-item a:focus-visible { color:#fff; text-decoration:underline; }
.latest-arrow { display:inline-block; margin:0 .4em; color:var(--accent); font-size:1.15em; line-height:0; font-weight:900; text-decoration:none; vertical-align:-.06em; }
@media (max-width:640px) {
  .latest-content { padding-bottom:45px; }
  .latest-row { grid-template-columns:1fr; gap:4px; }
}

/* Category bottom-navigation breathing room — common-architecture refinement. */
.mfa-category-bottom-navigation {
  padding-bottom: 40px;
}


/* Individual Gallery page bottom breathing room — same 2.5rem common spacer. */
.gallery-grid ~ .mfa-v55-comment-form {
  padding-bottom: 2.5rem !important;
}

/* Forum-specific spacing refinement.
   Keep the common action-section and comment-form spacing unchanged globally.
   Forum-only reduction:
   - Administrator Contact -> Page Actions: 82px -> 20.5px.
   - Page Actions -> Comment Form: 32px -> 8px.
*/
section[aria-labelledby="administrator-contact-title"],
section[aria-labelledby="forum-actions-title"] {
  margin-bottom: 20.5px !important;
}

section[aria-labelledby="forum-actions-title"] + .mfa-v55-comment-form {
  margin-top: 8px !important;
}
