/* maistrelis.com — static, simplified single-column version
   Reproduces the look of the home page (left/main column only). */

:root {
  --orange: #e8830c;
  --orange-dark: #c96f08;
  --text: #3b3b3b;
  --muted: #8a8a8a;
  --link: #0071b3;
  --rule: #e3e3e3;
  --page-bg: #f4f4f4;
  --content-bg: #ffffff;
  --frame: 1155px;   /* outer width: main content + book aside, aligned */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--page-bg);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- Header ---------- */

#header {
  background: #111;
  border-bottom: 4px solid var(--orange);
}

.header-inner {
  max-width: var(--frame);
  margin: 0 auto;
  padding: 12px 20px 6px;
  display: flex;
  align-items: flex-end;   /* name sits on the logo's baseline */
  gap: 18px;
  flex-wrap: wrap;
}

#logo img { display: block; max-height: 58px; }

/* ASCII animation used as the logo in the header (figures only, standing on the
   header's orange bottom-border, which plays the role of the ground) */
.header-anim {
  cursor: pointer;
  overflow: hidden;
  max-width: 100%;               /* cap to container; JS scales the pre to fit */
  min-width: 0;
  display: flex;
  align-items: flex-end;         /* feet sit at the bottom, near the orange line */
  height: 5em;                   /* 4 lines (tallest pose) × 1.25 line-height */
  font-size: 14px;               /* JS transform-scales the pre down to fit narrow screens */
  align-self: flex-end;
}
.header-anim pre {
  margin: 0;
  flex: 0 0 auto;                /* keep natural width; JS transform-scales to fit */
  font-family: "DejaVu Sans Mono", "Courier New", monospace;
  line-height: 1.25;
  white-space: pre;
  color: #ffd9a6;
}

/* Name + slogan sit right next to the ASCII-art logo (no longer pushed to the
   far right — that left an awkward gap once the logo became the wide animation). */
#name-and-slogan {
  line-height: 1.2;
  margin-left: 8px;
  text-align: left;
}

#site-name {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
}
#site-name a { color: #fff; }
#site-name a:hover { text-decoration: none; color: var(--orange); }

#site-slogan {
  color: var(--orange);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ---------- Menu (simplified, links to live site) ---------- */

#main-menu {
  background: #111;
}
#main-menu ul {
  max-width: var(--frame);
  margin: 0 auto;
  padding: 10px 20px 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
#main-menu a {
  display: block;
  padding: 8px 14px;
  color: #fff;
  font-size: 13px;
  border-radius: 4px 4px 0 0;
  background: #2a2a2a;
}
#main-menu a:hover,
#main-menu a.active {
  background: var(--orange);
  color: #fff;
  text-decoration: none;
}

/* ---------- Main column + book aside ---------- */

.main-row {
  max-width: var(--frame);
  margin: 0 auto;
  padding: 0 20px 40px;
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

#main {
  flex: 1 1 0;
  min-width: 0;        /* allow the column to shrink instead of overflowing */
}

#content {
  background: var(--content-bg);
  padding: 26px 30px;
  border: 1px solid var(--rule);
  border-top: none;
}

/* book promo aside (right on desktop, stacks on mobile) */
.book-aside {
  flex: 0 0 210px;
  position: sticky;
  top: 18px;
  margin-top: 16px;
}
.book-promo {
  background: var(--content-bg);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--orange);
  padding: 14px;
  text-align: center;
}
.book-promo-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 8px;
}
.book-promo .book-cover,
.book-promo .book-cover-ph {
  display: block;
  width: 140px;
  max-width: 100%;
  margin: 0 auto 10px;
  border: 1px solid var(--rule);
}
.book-promo .book-cover-ph {
  height: 200px;
  line-height: 200px;
  font-size: 56px;
  background: #f0f0f0;
  color: #bbb;
}
.book-promo-title {
  display: block;
  font-weight: 700;
  color: var(--orange-dark);
  line-height: 1.3;
}
.book-promo-title:hover { color: var(--orange); text-decoration: none; }
.book-promo-blurb { font-size: 12px; color: var(--muted); margin: 8px 0 10px; }
.book-promo-cta {
  display: inline-block;
  padding: 5px 16px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  border-radius: 4px;
}
.book-promo-cta:hover { background: var(--orange-dark); text-decoration: none; }

/* book page */
.book-page-cover { float: right; width: 200px; margin: 0 0 16px 24px; border: 1px solid var(--rule); }
.book-page .lead { font-size: 17px; color: var(--text); }

@media (max-width: 860px) {
  /* stack; stretch so #main fills the screen width instead of shrinking to its
     content (flex-start on the cross-axis would otherwise cause horizontal overflow) */
  .main-row { flex-direction: column; align-items: stretch; }
  .book-aside { flex-basis: auto; width: 100%; max-width: 340px; position: static; align-self: center; }
}

/* ASCII banner (animated "dancing man") */
#banner {
  margin: 0 0 24px;
  padding: 14px 16px;
  background: #111;
  color: #ffd9a6;
  overflow-x: auto;
}
#banner .anim {
  cursor: pointer;
  overflow: hidden;
}
#banner pre {
  margin: 0;
  /* Every animation frame is 6 lines tall (6 × 1.25 line-height = 7.5em).
     Lock the box to that height so it never grows/shrinks while playing. */
  height: 7.5em;
  font-family: "DejaVu Sans Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.25;
  white-space: pre;
}

/* ---------- Posts (teasers) ---------- */

.node {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.node:first-of-type { padding-top: 4px; }
.node:last-child { border-bottom: none; }

.node h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}
.node h2 a { color: var(--orange-dark); }
.node h2 a:hover { color: var(--orange); text-decoration: none; }

.submitted {
  margin-bottom: 10px;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
}

.post-body { overflow: hidden; }
.post-body p { margin: 0 0 12px; }

/* opt-in hyphenation (front matter: hyphenate: true) — justified text so the
   hyphenated line-breaks are visible. Hyphenator injects the soft hyphens. */
.post-body.hyphenate { text-align: justify; }

/* {{< hyphenation-toggle >}} switch */
.hyph-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: inherit;
  font-size: 0.85rem;
  padding: 5px 12px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: #f7f7f7;
  color: var(--text);
  cursor: pointer;
}
.hyph-toggle:hover { background: #efefef; }
.hyph-toggle .hyph-toggle-knob {
  position: relative;
  width: 28px;
  height: 15px;
  border-radius: 9px;
  background: var(--orange);
  flex: 0 0 auto;
  transition: background .15s;
}
.hyph-toggle .hyph-toggle-knob::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 14px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  transition: left .15s;
}
.hyph-toggle.off .hyph-toggle-knob { background: #bbb; }
.hyph-toggle.off .hyph-toggle-knob::after { left: 1px; }

/* footnote tooltips (footnotes.js) + smooth-nav highlight */
.fn-tooltip {
  position: absolute;
  z-index: 60;
  max-width: 320px;
  padding: 8px 11px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text);
}
.fn-tooltip[hidden] { display: none; }
.fn-tooltip p { margin: 0; }
.footnote-ref { cursor: help; }
.fn-flash { animation: fn-flash 1.4s ease-out; border-radius: 3px; }
@keyframes fn-flash {
  0%   { background: var(--orange); }
  100% { background: transparent; }
}

.img-right {
  float: right;
  margin: 4px 0 12px 18px;
  text-align: center;
}
.img-right .caption {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
}

/* Float μια φωτό αριστερά/δεξιά ώστε το κείμενο να τυλίγεται γύρω της.
   Βάλε class="photo-left" / "photo-right" σε <a> ή <img> μέσα στο body ή summary. */
.post-body .photo-left  { float: left;  clear: left;  max-width: 200px; margin: 5px 20px 12px 0; }
.post-body .photo-right { float: right; clear: right; max-width: 200px; margin: 5px 0 12px 20px; }
.post-body .photo-left img,
.post-body .photo-right img { display: block; max-width: 100%; height: auto; }

/* Editor's note: η φωνή του σήμερα πάνω σ' ένα αρχειακό (π.χ. 2012) κείμενο.
   Το monospace eyebrow δένει με το ASCII banner του header· η πορτοκαλί γραμμή
   (signature του site) γίνεται αριστερό rule. Reusable σε κάθε παλιό άρθρο. */
.post-body .disclaimer {
  clear: both;
  margin: 0 0 30px;
  padding: 18px 22px;
  border-left: 3px solid var(--orange);
  background: #faf6ef;
  color: #565656;
  font-size: 13.5px;
  line-height: 1.7;
}
/* Το label γράφεται μέσα στο .disclaimer ως <div class="disclaimer-head">,
   ώστε ο συγγραφέας να το αλλάζει ανά άρθρο (π.χ. «Σημείωμα από το 2026»).
   text-transform: uppercase → eyebrow look ανεξάρτητα από το πώς γράφεται. */
.post-body .disclaimer-head {
  margin-bottom: 10px;
  font-family: "DejaVu Sans Mono", "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-dark);
}
/* top-margin (not bottom): δουλεύει και για τη 1η γυμνή παράγραφο που ο goldmark
   αφήνει χωρίς <p> μέσα στο raw-HTML block */
.post-body .disclaimer p { margin: 12px 0 0; }

/* Tags */
.tags {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.tags .label { font-weight: 700; margin-right: 6px; }
.tags a {
  display: inline-block;
  padding: 1px 8px;
  margin: 0 4px 4px 0;
  background: #f0f0f0;
  border-radius: 3px;
  color: var(--link);
}

/* Subject cloud (/subjects/) — replaces the Hugo tag cloud */
.subject-cloud {
  list-style: none;
  margin: 16px 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}
.subject-cloud li { white-space: nowrap; }
.subject-cloud .count {
  font-size: 11px;
  color: var(--muted);
  vertical-align: super;
  margin-left: 2px;
}

/* Read more */
.read-more {
  margin-top: 12px;
}
.read-more a {
  display: inline-block;
  padding: 5px 14px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  border-radius: 4px;
}
.read-more a:hover { background: var(--orange-dark); text-decoration: none; }

.feed {
  margin-top: 20px;
}

/* ---------- Footer ---------- */

#footer {
  max-width: var(--frame);
  margin: 0 auto;
  padding: 18px 20px 40px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.footer-links { margin-bottom: 8px; }
.footer-links-label { font-weight: 700; margin-right: 8px; }
.footer-links a { margin: 0 6px; }
.footer-links a:not(:last-child)::after {
  content: "·";
  margin-left: 12px;
  color: var(--rule);
}
.footer-copy { color: var(--muted); }
.footer-rss {
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #fff;
  background: var(--orange);
  padding: 2px 8px;
  border-radius: 3px;
}
.footer-rss:hover { background: var(--orange-dark); text-decoration: none; color: #fff; }

/* ---------- Archive items ---------- */

.item h2 { color: var(--orange-dark); margin: 0 0 16px; }

/* key-value metadata (RDFa definition list) */
.item-fields {
  margin: 0 0 22px;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
}
.item-fields dt {
  font-weight: 700;
  color: var(--muted);
  grid-column: 1;
}
.item-fields dd {
  margin: 0;
  grid-column: 2;
  word-break: break-word;
}

/* archived files table */
.item-files {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.item-files th {
  text-align: left;
  background: #f0f0f0;
  color: var(--muted);
  font-weight: 700;
  padding: 6px 8px;
  border-bottom: 2px solid var(--orange);
}
.item-files td {
  padding: 8px;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
.item-files td.thumb { width: 96px; }
.item-files td.thumb img { display: block; max-width: 88px; max-height: 264px; height: auto; }
.item-files th.thsize { text-align: right; }
.item-files td.fsize { text-align: right; white-space: nowrap; color: var(--muted); }
.item-files td.fdl { text-align: center; width: 40px; }
.item-files .ftype { color: var(--muted); }
.item-files .finfo { display: block; font-size: 12px; color: var(--muted); font-style: italic; margin-top: 2px; }
.item-files .fsource { display: block; font-size: 12px; margin-top: 2px; }

/* related items (bidirectional) — shown before the "Διαθέσιμα τεκμήρια" table */
.item-related { margin: 0 0 22px; }
.item-related-head {
  margin: 0 0 6px;
  padding: 6px 8px;
  background: #f0f0f0;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  border-bottom: 2px solid var(--orange);
}

/* archive sub-navigation (items | collections) */
.archive-nav {
  display: flex;
  gap: 6px;
  margin: 0 0 20px;
  border-bottom: 2px solid var(--orange);
}
.archive-nav a {
  padding: 8px 18px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  background: #f0f0f0;
  border-radius: 4px 4px 0 0;
}
.archive-nav a:hover { color: var(--orange-dark); text-decoration: none; }
.archive-nav a.active {
  background: var(--orange);
  color: #fff;
}

/* item-level thumbnail (single page) */
.item-thumb {
  float: right;
  margin: 0 0 12px 18px;
}
.item-thumb img {
  display: block;
  max-width: 160px;
  height: auto;
  border: 1px solid var(--rule);
  padding: 3px;
  background: #fff;
}

/* items list (/items/) */
/* item type badge */
.item-type-line { margin: -8px 0 16px; }
.item-date { font-size: 12px; color: var(--muted); }
.item-type {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f0f0f0;
  color: var(--muted);
  padding: 1px 8px;
  border-radius: 3px;
}
.item-row .item-type { padding: 0 6px; }
.item-type-section { background: var(--orange); color: #fff; }

.item-desc, .collection-desc { margin: 0 0 22px; }

.clearfix { clear: both; }   /* {{< clear >}} shortcode — break floats */

/* item → article back-link (OPAC record, partials/article-link.html) */
.article-ref {
  margin: 2px 0 18px;
  padding: 8px 12px;
  background: #fff7ee;
  border-left: 3px solid var(--orange);
  border-radius: 4px;
  font-size: 0.95em;
}
.article-ref-label { color: var(--muted); margin-right: 6px; }
.article-ref-link { font-weight: bold; }

/* dead/unreachable source link marker (sourceStatus) */
.dead-link { color: #b00; font-weight: bold; text-decoration: none; cursor: help; border: 0; }
.fsource-dead a { color: var(--muted); }
.archived-link { text-decoration: none; }   /* 🏛 link to Wayback Machine */

/* {{< item-link >}} box — link from an article/post to its archive item */
.item-ref-wrap { clear: both; text-align: center; }   /* drop below floated photos → centered box at the end */
.item-ref-box {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 18px 0;
  padding: 5px 11px;
  border: 1px solid var(--orange);
  border-left: 3px solid var(--orange);
  border-radius: 4px;
  background: #fff7ee;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9em;
}
.item-ref-box:hover { background: var(--orange); color: #fff; }
.item-ref-box .item-ref-icon { font-size: 1em; line-height: 1; }
.item-ref-box::after { content: "→"; margin-left: 4px; }
.item-desc p, .collection-desc p { margin: 0 0 12px; }
.collection h2 { color: var(--orange-dark); margin: 0 0 16px; }

/* contact form */
.contact-intro { margin: 0 0 18px; color: var(--muted); }
.contact-form { max-width: 560px; }
.contact-form label {
  display: block;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
}
.contact-form input[type=text],
.contact-form input[type=email],
.contact-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  padding: 9px 12px;
  font: inherit;
  font-weight: 400;
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--orange); }
.contact-form button[type=submit] {
  padding: 9px 22px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}
.contact-form button[type=submit]:hover { background: var(--orange-dark); }
.contact-form button[disabled] { opacity: 0.6; cursor: default; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-status { margin: 12px 0 0; font-size: 14px; }
.contact-status.ok  { color: #2e7d32; font-weight: 700; }
.contact-status.err { color: #c0392b; font-weight: 700; }

.empty-state { color: var(--muted); font-style: italic; }

/* search */
.search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  margin-bottom: 10px;
}
.search-input:focus { outline: none; border-color: var(--orange); }
.search-status { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.search-snippet { margin: 4px 0 0; font-size: 13px; color: #555; }

/* "Σχετικό περιεχόμενο" (reverse subjects): frame the whole block so the grouped
   content reads as belonging to it, and demote the per-type subheadings below the
   section title. */
.item-subject-of {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0 14px 8px;
}
.item-subject-of .item-related-head {
  margin: 0 -14px 4px;          /* flush to the frame edges, like a card header */
  border-radius: 4px 4px 0 0;
}
.item-subject-of .term-group {
  margin: 14px 0 6px;
  font-size: 12px;
  border-bottom: 1px solid var(--orange); /* thinner than the title's 2px rule */
  text-transform: none;                   /* sentence case, not all-caps */
  letter-spacing: 0;
}

/* taxonomy term page: per-type group headings */
.term-group {
  margin: 22px 0 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--orange);
  font-size: 15px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.item-list { list-style: none; padding: 0; margin: 0; }
.item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.item-row-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-row-thumb img { max-width: 56px; max-height: 56px; height: auto; }
.item-row-thumb .noimg {
  width: 56px; height: 56px;
  background: #f0f0f0;
  border: 1px solid var(--rule);
  display: block;
}
.item-row-meta { display: flex; flex-direction: column; }
.item-row-title { font-weight: 700; color: var(--orange-dark); }
.item-row-title:hover { color: var(--orange); text-decoration: none; }
.item-row-meta .submitted { margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  .header-inner { justify-content: center; text-align: center; }
  #main-menu ul { justify-content: center; }
  #content { padding: 20px 16px; }
  .img-right { float: none; margin: 0 auto 12px; display: block; }
  .post-body .photo-left,
  .post-body .photo-right { float: none; clear: none; max-width: 100%; margin: 0 auto 12px; text-align: center; }
  .post-body .photo-left img,
  .post-body .photo-right img { margin: 0 auto; }
  .item-fields { grid-template-columns: 1fr; gap: 0 0; }
  .item-fields dd { margin-bottom: 8px; }
}

/* ---------- Lightbox (replaces Drupal colorbox) ---------- */

body.lb-locked { overflow: hidden; }

.lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
}
.lb-overlay.is-open { display: flex; }

.lb-figure {
  margin: 0;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lb-img {
  max-width: 92vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  border: 3px solid #fff;
}
.lb-caption {
  color: #eee;
  font-size: 13px;
  margin-top: 8px;
  text-align: center;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; color: var(--orange); }

.lb-close { top: 14px; right: 20px; font-size: 40px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 56px; padding: 0 18px; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }

@media (max-width: 600px) {
  .lb-prev, .lb-next { font-size: 40px; padding: 0 8px; }
  .lb-close { font-size: 32px; top: 8px; right: 12px; }
}

/* Optional per-tag description shown on a tag's term page. */
.term-desc {
  margin: 0 0 18px;
  padding: 10px 14px;
  background: #faf6ef;
  border-left: 3px solid var(--orange);
  color: var(--text);
  font-size: 14px;
}
.term-desc p { margin: 0; }

/* ---------- Photo gallery (gallery shortcode + lightbox) ---------- */

.ik-gallery { margin-left: 0; }
.ik-gallery .frame {
  border: 1px solid #c0c0c0;
  background-color: #000033;
  float: left;
  margin: 6px;
  padding: 0;
}
.ik-gallery .shot {
  min-height: 180px;
  padding: 0;
  margin: 0;
  display: table-cell;
  vertical-align: bottom;
}
.ik-gallery .shot .caption {
  margin: 0;
  padding: 3px 4px;
  background-color: var(--orange);
  color: #fff;
  font-size: 12px;
  text-align: left;
}
.ik-gallery .shot .caption a { color: #fff; text-decoration: none; }
.ik-gallery .shot .caption .cap-info { margin-top: 2px; }
.ik-gallery .shot, .ik-gallery img, .ik-gallery a { margin: 0; padding: 0; }
.ik-gallery .shot img { vertical-align: bottom; display: block; }
.ik-gallery .spacer { clear: both; }

/* ---- Display modes (front-matter `galleryStyle`) ----
   classic = above (float, varying heights). grid/overlay = uniform square tiles. */
.ik-gallery--grid,
.ik-gallery--overlay {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 0;
}
.ik-gallery--grid .spacer,
.ik-gallery--overlay .spacer { display: none; }
.ik-gallery--grid .frame,
.ik-gallery--overlay .frame { float: none; margin: 0; }
.ik-gallery--grid .shot,
.ik-gallery--overlay .shot { display: block; min-height: 0; }
.ik-gallery--grid .shot img,
.ik-gallery--overlay .shot img { width: 100%; height: 150px; object-fit: cover; }

/* overlay: caption sits translucent over the bottom of each tile */
.ik-gallery--overlay .shot { position: relative; }
.ik-gallery--overlay .shot img { height: 170px; }
.ik-gallery--overlay .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(232, 131, 12, 0.85);
}

/* ---- Legacy article bodies on phones ----
   Migrated Drupal posts use inline float:right + fixed widths (divs/tables) that
   overflow narrow screens. Linearize them on phones. Scoped to .post-body and to
   INLINE-styled floats, so the gallery (floats via .frame class) is untouched. */
@media (max-width: 600px) {
  #content .post-body [style*="float"] {
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  #content .post-body .kbox { width: auto !important; }
  #content .post-body table { width: 100% !important; }
  #content .post-body table img,
  #content .post-body [style*="float"] img {
    max-width: 100% !important;
    height: auto !important;
  }
}
