/* The site's right rail (.gallery-rail), one stylesheet for every section that shows it (2026-11-09, Literature
   Section Refinements: "Shared styles"). Markup: shared/template/gallery/rail.php. Loaded by the Gallery family
   (gallery/meta.php: Gallery, car pages, For Sale, Statistics, Express, site pages) and by Literature
   (literature/meta.php). Page-level settings (the 210px width on Gallery pages, layout around the rail) stay with
   each section: gallery_shell.css / home_shell.css, lit_shell.css. Rules below moved verbatim from gallery_shell.css. */

.gallery-rail { display:flex; flex-direction:column; gap:14px; width:110px; flex-shrink:0; position:sticky; top:20px; }
.gallery-rail__heading { font-size:.8rem; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:#152536;
  text-align:center; padding-bottom:8px; border-bottom:1px solid #d0d5db; margin-bottom:4px; }
.gallery-rail__cell { display:block; text-align:center; text-decoration:none; border-radius:8px; padding:4px; margin:0 -4px; }
.gallery-rail__cell:hover { background:#eceef1; }
.gallery-rail__cell img { width:100%; height:auto; display:block; }
.gallery-rail__cell span { display:block; margin-top:4px; font-size:.75rem; font-weight:600; color:#5a6772; }
/* PS2 (operator, 2026-10-09): below 780px the rail sits under the content; its cells now fill the width in a grid
   (3 across on a 360px phone) instead of keeping the desktop's single 110px column. */
@media (max-width:780px){
  .gallery-rail{ position:static; width:100%; box-sizing:border-box; padding:0 16px; display:grid;
    grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:14px 12px; }
  /* a rule above FORUM as well (operator, 2026-10-09): the same line and padding as the one below it */
  .gallery-rail{ --rail-head-pad:8px; --rail-head-pad--label:"Forum heading: padding above and below its rules"; }
  .gallery-rail__heading{ grid-column:1 / -1; border-top:1px solid #d0d5db; padding-top:var(--rail-head-pad); padding-bottom:var(--rail-head-pad); }
  /* captions aligned (operator, 2026-10-09): every drawing sits in the same box height, bottom-aligned, so the names line up */
  .gallery-rail{ --rail-img-h:62px; --rail-grid-min:96px; --rail-img-h--label:"Forum tiles: picture height"; --rail-grid-min--label:"Forum tiles: minimum tile width";
    grid-template-columns:repeat(auto-fill, minmax(var(--rail-grid-min), 1fr)); }
  .gallery-rail__cell img{ height:var(--rail-img-h); width:100%; object-fit:contain; object-position:center bottom; }
}
.gallery-rail__cell:hover span { color:#0d6efd; }
/* Featured Post cell at the top of the rail (operator, 2026-11-07): the Home Page's cell (home_cells.css) at its PS2 values,
   in px because the HP's root text is 15px and this page's 16px; hidden below 781px, as on the HP. */
.gallery-rail > .hp-post, .gallery-rail > .gallery-rail__add{ display:none; }
.gallery-rail__forum-cell, .gallery-rail__forum-icons{ display:contents; }   /* phones: the tiles stay items of the rail's grid */
/* The cell's look applies at every width (2026-11-09, so a section may show it on phones: Literature); it is shown
   from 781px only, unless the section says otherwise. Values unchanged. */
.gallery-rail{ --gr-post-pad-x:14px; --gr-post-pad-x--label:"Featured Post: side padding"; }
.gallery-rail > .hp-post{ flex-direction:column; gap:8px; box-sizing:border-box; overflow:hidden; margin-top:2px;
  padding:8px var(--gr-post-pad-x) 8px; border:1px solid #e5e7eb; border-radius:8px; background:#fff; text-decoration:none; color:var(--home-text, #222); }
.gallery-rail > .hp-post:hover{ border-color:#d0d5db; background:#fbfbfc; }
.gallery-rail .hp-post__head{ padding-bottom:8px; border-bottom:1px solid #d0d5db; text-align:center;
  font-size:12px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:#152536; }
.gallery-rail .hp-post__title{ font-size:13px; font-weight:700; line-height:1.25; color:#152536; overflow-wrap:anywhere; }
.gallery-rail .hp-post:hover .hp-post__title{ color:#0d6efd; }
.gallery-rail .hp-post__text{ display:block; font-size:12.75px; line-height:1.6em; max-height:170px; overflow:hidden;
  -webkit-mask-image:linear-gradient(to bottom, #000 calc(100% - 48px), transparent); mask-image:linear-gradient(to bottom, #000 calc(100% - 48px), transparent); }
.gallery-rail .hp-post__img{ display:block; width:100%; aspect-ratio:4/3; overflow:hidden; border-radius:4px; background:#f3f4f6; }
.gallery-rail .hp-post__img img{ display:block; width:100%; height:100%; object-fit:cover; }
.gallery-rail .hp-post--img .hp-post__text{ max-height:66px; }
.gallery-rail .hp-post__by{ font-size:9.3px; color:#5a6772; }
@media (min-width:781px){ .gallery-rail > .hp-post{ display:flex; } }
@media (min-width:781px){
  .gallery-rail{ --gr-forum-col-w:88px; --gr-forum-col-w--label:"Forum cell: icon size (two across at 88px)";
    --gr-forum-pad:8px; --gr-forum-pad--label:"Forum cell: inner padding"; }
  /* the Add button on Kandahar Grey, as on the HP */
  .gallery-rail > .gallery-rail__add{ display:flex; box-sizing:border-box; background:#c2c3b3; }
  .gallery-rail > .gallery-rail__add:hover{ background:#b1b2a1; }
  .gallery-rail > .gallery-rail__forum-cell{ display:block; box-sizing:border-box; padding:var(--gr-forum-pad); border:1px solid #e5e7eb; border-radius:8px; background:#fff; }
  .gallery-rail__forum-icons{ display:grid; grid-template-columns:repeat(auto-fill, min(var(--gr-forum-col-w), 100%)); justify-content:center;
    column-gap:8px; row-gap:14px; align-items:center; }
  .gallery-rail__forum-icons .gallery-rail__cell{ margin:0; box-sizing:border-box; }
  .gallery-rail__forum-icons .gallery-rail__cell span{ display:none; }
}

/* The site button (.cr-btn), for sections that do not load home_shell.css (Literature). Same values as home_shell.css's
   .cr-btn, "--sm" size, scoped to the rail so it changes nothing where home_shell.css is loaded (display is left to the rail's own rules: the Add
   button shows from 781px). Keep in step with it. */
.gallery-rail .cr-btn{ align-items:stretch; overflow:hidden; padding:0; border:0; border-radius:4px; color:#152536;
  font:inherit; font-weight:600; text-decoration:none; text-align:center; cursor:pointer; }
.gallery-rail .cr-btn--sm{ font-size:.85rem; line-height:1.2; }
.gallery-rail .cr-btn__sym{ display:flex; align-items:center; background:#a6192e; padding:0 .4rem; }
.gallery-rail .cr-btn__sym img{ display:block; height:20px; width:auto; filter:invert(1); mix-blend-mode:screen; }
.gallery-rail .cr-btn__text{ flex:1; padding:.5rem .35rem; }

/* Express Registry cell (Literature, 2026-11-09: between the Featured Post and the Forum cell). The Home Page's phone
   cell (mockup C, home_cells.css) in this rail's format: heading in small capitals over a rule, the "Own a ...?" line,
   the address on one line (rail.php swaps in a model whose address fits). Shown on every width. */
.gallery-rail__express{ display:block; box-sizing:border-box; padding:8px 10px 9px; border:1px solid #e5e7eb; border-radius:8px;
  background:#fff; color:#222; text-decoration:none; text-align:center; contain:inline-size; }
.gallery-rail__express:hover{ border-color:#d0d5db; background:#fbfbfc; }
.gallery-rail__express > span{ display:block; }
.gallery-rail__express .gr-xp__title{ font-size:12px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:#152536;
  padding-bottom:6px; border-bottom:1px solid #d0d5db; margin-bottom:6px; }
.gallery-rail__express .gr-xp__own{ font-size:13px; line-height:1.35; }
.gallery-rail__express .gr-xp__email{ display:block; font-size:12px; color:#4b5563; }
.gallery-rail__express .gr-xp__addr{ font-size:13.5px; line-height:1.5; white-space:nowrap; }
.gallery-rail__express .gr-xp__key{ font-weight:600; color:#0000ee; }
.gallery-rail__express:hover .gr-xp__key{ text-decoration:underline; }
.gallery-rail__express .gr-xp__any{ margin-top:4px; font-size:11px; color:#4b5563; }
@media (max-width:780px){
  .gallery-rail > .gallery-rail__express{ grid-column:1 / -1; }
  .gallery-rail__express .gr-xp__own{ font-size:14px; }
  .gallery-rail__express .gr-xp__email{ font-size:13px; }
  .gallery-rail__express .gr-xp__addr{ font-size:15px; }
  .gallery-rail__express .gr-xp__any{ font-size:12px; }
}
