/* =====================================================
   INDYMEDIA ATHENS — style.css
   ─────────────────────────────────────────────────────
   Edit the variables in :root to retheme everything.
   Sections are clearly labelled for easy customisation.
   ===================================================== */

/* ─── 1. DESIGN TOKENS ──────────────────────────────── */
:root {
  /* Brand colors */
  --color-primary:        #c0392b;   /* primary accent — header, accents */
  --color-primary-dark:   #922b21;   /* hover / deeper red */
  --color-primary-light:  #e74c3c;   /* highlights, links hover */

  /* Page background & surfaces */
  --color-bg:             #f4f0e8;   /* warm off-white body */
  --color-surface:        #ffffff;   /* card / article bg */
  --color-surface-alt:    #eae6dd;   /* alternate stripe / sidebar bg */

  /* Text */
  --color-text:           #1a1a1a;   /* primary body text */
  --color-text-muted:     #555555;   /* dates, meta info */
  --color-text-light:     #888888;   /* secondary labels */

  /* Links */
  --color-link:           #b03020;   /* default link */
  --color-link-hover:     #e74c3c;   /* link hover */
  --color-link-visited:   #7b241c;   /* visited */

  /* Borders */
  --color-border:         #ccbfb0;   /* default border */
  --color-border-strong:  #9a8878;   /* stronger divider */

  /* Topbar & footer */
  --color-topbar-bg:      #1a1a1a;
  --color-topbar-text:    #cccccc;
  --color-footer-bg:      #1f1f1f;
  --color-footer-text:    #bbbbbb;
  --color-footer-heading: #ffffff;

  /* Header */
  --color-header-bg:      #2c2c2c;
  --color-header-text:    #ffffff;

  /* Sidebar titles */
  --color-sidebar-title-bg:   #c0392b;
  --color-sidebar-title-text: #ffffff;

  /* Publish bar */
  --color-publish-bar-bg:   #2c2c2c;
  --color-publish-bar-text: #f0d080;

  /* Calendar */
  --color-cal-today-bg:    #c0392b;
  --color-cal-today-text:  #ffffff;
  --color-cal-event-text:  #c0392b;
  --color-cal-weekend:     #888888;

  /* Typography */
  --font-ui:      'Georgia', 'Times New Roman', serif;
  --font-body:    'Georgia', 'Times New Roman', serif;
  --font-mono:    'Courier New', Courier, monospace;
  --font-sans:    Verdana, Geneva, Tahoma, sans-serif;  /* nav, labels */

  /* Spacing */
  --gap:          1rem;
  --gap-sm:       0.5rem;
  --gap-lg:       1.5rem;

  /* Layout widths */
  --sidebar-left-width:   0px;     /* left sidebar removed — content is moved to right */
  --sidebar-right-width:  240px;   /* wider combined sidebar on right */
  --max-width:            1200px;  /* slightly wider overall */

  /* Radius & shadow */
  --radius:       2px;
  --shadow:       0 1px 3px rgba(0,0,0,0.12);
}


/* ─── 2. RESET & BASE ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family:      var(--font-body);
  background-color: var(--color-bg);
  color:            var(--color-text);
  line-height:      1.55;
}

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

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

ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-ui);
  font-weight: bold;
  line-height: 1.25;
}


/* ─── 3. TOPBAR — sits inside #site-header, inherits its bg ── */
#topbar {
  /* transparent — header bg image shows through */
  background:    transparent;
  color:         var(--color-topbar-text);
  font-family:   var(--font-sans);
  font-size:     0.78rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

#topbar-inner {
  max-width:     var(--max-width);
  margin:        0 auto;
  padding:       4px var(--gap);
  display:       flex;
  align-items:   center;
  gap:           var(--gap);
  flex-wrap:     wrap;
}

#lang-links,
#tool-links {
  display: flex;
  gap:     var(--gap-sm);
}

#lang-links li a,
#tool-links li a {
  color:   var(--color-topbar-text);
  padding: 2px 6px;
  border:  1px solid #555;
  border-radius: var(--radius);
  font-size: 0.75rem;
}
#lang-links li a:hover,
#tool-links li a:hover {
  background: #333;
  text-decoration: none;
}

#search-form {
  display:   flex;
  flex:      1;
  gap:       4px;
  max-width: calc(100% - 210px); /* leave room for donate + register + login buttons */
}
#search-form input {
  flex:             1;
  min-width:        0;
  padding:          3px 7px;
  background:       rgba(0,0,0,0.35);
  border:           1px solid rgba(255,255,255,0.25);
  color:            #eee;
  font-family:      var(--font-sans);
  font-size:        0.78rem;
  border-radius:    var(--radius);
}
#search-form input::placeholder { color: rgba(255,255,255,0.5); }
#search-form button {
  background:   var(--color-primary);
  color:        #fff;
  border:       none;
  padding:      3px 10px;
  cursor:       pointer;
  border-radius: var(--radius);
  font-size:    0.78rem;
}
#search-form button:hover { background: var(--color-primary-dark); }

#tool-links { margin-left: auto; display: flex; gap: 6px; align-items: center; }

/* Login / Register buttons in topbar */
.topbar-btn {
  font-family:     var(--font-sans);
  font-size:       0.75rem;
  font-weight:     bold;
  padding:         3px 12px;
  border-radius:   var(--radius);
  text-decoration: none;
  white-space:     nowrap;
  transition:      background 0.15s, color 0.15s;
}
.topbar-btn-login {
  background:  var(--color-primary);
  color:       #fff !important;
  border:      1px solid var(--color-primary);
}
.topbar-btn-login:hover {
  background:  var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  text-decoration: none;
}
.topbar-btn-register {
  background:  transparent;
  color:       rgba(255,255,255,0.85) !important;
  border:      1px solid rgba(255,255,255,0.35);
}
.topbar-btn-register:hover {
  background:  rgba(255,255,255,0.15);
  color:       #fff !important;
  text-decoration: none;
}
.topbar-btn-donate {
  background:  #e6a817;
  color:       #1a1a1a !important;
  border:      1px solid #e6a817;
}
.topbar-btn-donate:hover {
  background:  #c8911a;
  border-color: #c8911a;
  color:       #1a1a1a !important;
  text-decoration: none;
}


/* ─── 4. HEADER WRAPPER — wraps topbar + nav ────────── */
/* #site-header now contains BOTH the topbar and the logo/nav row.
   This lets a background image span the full header area. */
#site-header {
  background:          var(--color-header-bg);
  color:               var(--color-header-text);
  border-bottom:       3px solid var(--color-primary);
  background-size:     cover;
  background-position: center center;
  background-repeat:   no-repeat;
  position:            relative;
  transition:          min-height 0.3s ease;
}

#header-inner {
  max-width:   var(--max-width);
  margin:      0 auto;
  padding:     var(--gap) var(--gap);
  display:     flex;
  align-items: center;
  gap:         var(--gap-lg);
  flex-wrap:   wrap;
  /* When header has a bg image and min-height, vertically centre content */
  min-height:  inherit;
}

#logo-block { flex-shrink: 0; }

#site-logo {
  display:     inline-flex;
  align-items: baseline;
  gap:         4px;
  text-decoration: none;
}

#logo-a {
  font-family:  var(--font-sans);
  font-size:    2rem;
  font-weight:  bold;
  color:        var(--color-primary);
  letter-spacing: -1px;
}

#logo-b {
  font-family: var(--font-ui);
  font-size:   1.7rem;
  font-weight: bold;
  color:       #fff;
  letter-spacing: 1px;
}

#site-tagline {
  font-family: var(--font-sans);
  font-size:   0.72rem;
  color:       #aaa;
  margin-top:  3px;
  letter-spacing: 0.5px;
}

#main-nav { margin-left: auto; }

#main-nav ul {
  display:   flex;
  flex-wrap: wrap;
  gap:       2px;
}

#main-nav ul li a {
  display:      block;
  padding:      5px 10px;
  color:        #ddd;
  font-family:  var(--font-sans);
  font-size:    0.8rem;
  border-radius: var(--radius);
  transition:   background 0.15s;
}
#main-nav ul li a:hover {
  background:      var(--color-primary);
  color:           #fff;
  text-decoration: none;
}

#main-nav ul li a.nav-active {
  background: var(--color-primary);
  color:      #fff;
}


/* ─── 5. PUBLISH BAR ────────────────────────────────── */
#publish-bar {
  background: var(--color-publish-bar-bg);
  text-align: center;
  padding:    5px var(--gap);
  border-bottom: 1px solid #444;
}

#publish-bar a {
  color:       var(--color-publish-bar-text);
  font-family: var(--font-sans);
  font-size:   0.8rem;
  font-weight: bold;
  letter-spacing: 0.3px;
}
#publish-bar a:hover {
  color:           #fff;
  text-decoration: none;
}


/* ─── 6. WRAPPER — post column left, sidebar right ──── */
#wrapper {
  max-width: var(--max-width);
  margin:    0 auto;
  padding:   var(--gap);
  display:   grid;
  grid-template-columns: 1fr var(--sidebar-right-width);
  grid-template-areas:   "main right";
  gap:       var(--gap);
  align-items: start;
}

/* sidebar-left content is now rendered inside sidebar-right */
#sidebar-left  { display: contents; } /* children flow into DOM order */
#content       { grid-area: main; }
#sidebar-right { grid-area: right; }


/* ─── 7. SIDEBAR SHARED STYLES ──────────────────────── */
.sidebar-block {
  background:    var(--color-surface);
  border:        1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--gap);
  overflow:      hidden;
}

.sidebar-title {
  background:  var(--color-sidebar-title-bg);
  color:       var(--color-sidebar-title-text);
  font-family: var(--font-sans);
  font-size:   0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding:     5px 8px;
}

.sidebar-more {
  display:     block;
  padding:     4px 8px;
  font-size:   0.75rem;
  font-family: var(--font-sans);
  color:       var(--color-link);
  border-top:  1px solid var(--color-border);
  background:  var(--color-surface-alt);
}
.sidebar-more:hover { background: var(--color-border); text-decoration: none; }


/* ─── 8. NEWSWIRE ───────────────────────────────────── */
.newswire-list { padding: 4px 0; }

.newswire-list li {
  display:     flex;
  flex-direction: column;
  padding:     4px 8px;
  border-bottom: 1px dotted var(--color-border);
  font-size:   0.8rem;
}
.newswire-list li:last-child { border-bottom: none; }

.nw-date {
  font-family: var(--font-sans);
  font-size:   0.68rem;
  color:       var(--color-text-muted);
}

.nw-link { color: var(--color-link); line-height: 1.3; }


/* ─── 9. TOPIC & LINK LISTS ─────────────────────────── */
.topic-list li,
.site-list li,
.media-list li,
.link-list li {
  border-bottom: 1px dotted var(--color-border);
  padding:       5px 8px;
  font-size:     0.8rem;
}
.topic-list li:last-child,
.site-list li:last-child,
.media-list li:last-child,
.link-list li:last-child { border-bottom: none; }

.topic-list a,
.site-list a,
.media-list a,
.link-list a {
  color:       var(--color-link);
  font-family: var(--font-sans);
}


/* ─── 10. CALENDAR ──────────────────────────────────── */
.cal-table {
  width:           100%;
  border-collapse: collapse;
  font-family:     var(--font-sans);
  font-size:       0.78rem;
}

.cal-table caption {
  padding:    4px 8px;
  font-size:  0.72rem;
  font-weight: bold;
  text-align: center;
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  color:      var(--color-text-muted);
}

.cal-table th {
  text-align:  center;
  padding:     3px 2px;
  font-size:   0.68rem;
  color:       var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  background:  var(--color-surface-alt);
}

.cal-table td {
  text-align: center;
  padding:    3px 2px;
  font-size:  0.78rem;
  border-bottom: 1px dotted var(--color-border);
}

.cal-sat, .cal-sun { color: var(--color-cal-weekend); }

.cal-today {
  background:    var(--color-cal-today-bg);
  color:         var(--color-cal-today-text);
  font-weight:   bold;
  border-radius: var(--radius);
}

.cal-event {
  color:       var(--color-cal-event-text);
  font-weight: bold;
}


/* ─── 11. EVENTS LIST ───────────────────────────────── */
.event-list { padding: 4px 0; }

.event-item {
  display:       flex;
  flex-direction: column;
  padding:       5px 8px;
  border-bottom: 1px dotted var(--color-border);
  font-size:     0.78rem;
}
.event-item:last-child { border-bottom: none; }

.event-date {
  font-family: var(--font-sans);
  font-size:   0.68rem;
  color:       var(--color-primary);
  font-weight: bold;
}

.event-title { color: var(--color-link); line-height: 1.3; }

.event-location {
  font-size:   0.68rem;
  color:       var(--color-text-muted);
  font-style:  italic;
}


/* ─── 12. MAIN CONTENT / ARTICLES ───────────────────── */
#content { min-width: 0; }

.feature-story,
.story {
  background:    var(--color-surface);
  border:        1px solid var(--color-border);
  border-radius: var(--radius);
  padding:       var(--gap);
  margin-bottom: var(--gap);
}

/* ══════════════════════════════════════════════════════
   FEATURED POST — full treatment
   ══════════════════════════════════════════════════════ */
.feature-story {
  background:    #fffdf7;              /* warm cream tint */
  border:        1px solid #d4b896;   /* warm tan border */
  border-top:    none;                /* header block replaces top border */
  border-radius: var(--radius);
  position:      relative;
  padding:       0;                   /* header + body handle their own padding */
  overflow:      hidden;
  box-shadow:    0 2px 8px rgba(0,0,0,0.07);
}

/* ── Header band ── */
.feature-story::before {
  content:        "";
  display:        block;
  height:         4px;
  background:     linear-gradient(90deg, var(--color-primary) 0%, #e8805a 100%);
}

/* Label + title area */
.feature-story .feature-label {
  display:          flex;
  align-items:      center;
  gap:              10px;
  background:       linear-gradient(135deg, #2c2c2c 0%, #3d3d3d 100%);
  padding:          8px var(--gap) 7px;
  border-bottom:    1px solid #1a1a1a;
}

.feature-story .feature-label-badge {
  display:          inline-flex;
  align-items:      center;
  gap:              5px;
  background:       var(--color-primary);
  color:            #fff;
  font-family:      var(--font-sans);
  font-size:        0.62rem;
  font-weight:      bold;
  letter-spacing:   1.4px;
  text-transform:   uppercase;
  padding:          3px 9px 3px 7px;
  border-radius:    2px;
  white-space:      nowrap;
  flex-shrink:      0;
}

.feature-story .feature-label-badge::before {
  content:   "★";
  font-size: 0.7rem;
}

.feature-story .feature-label-text {
  font-family:  var(--font-sans);
  font-size:    0.68rem;
  color:        #aaa;
  letter-spacing: 0.3px;
}

/* Inner content padding */
.feature-story .feature-inner {
  padding: var(--gap);
}

/* Story title inside featured */
.feature-story .story-title {
  font-size:     1.52rem;
  margin-bottom: 6px;
  line-height:   1.2;
}

.feature-story .story-title a {
  color: var(--color-text);
}
.feature-story .story-title a:hover {
  color:           var(--color-primary);
  text-decoration: none;
}

/* Read more link styled as a button in featured */
.feature-story .story-read-more a {
  display:          inline-block;
  margin-top:       4px;
  padding:          5px 14px;
  background:       var(--color-primary);
  color:            #fff;
  font-family:      var(--font-sans);
  font-size:        0.78rem;
  font-weight:      bold;
  border-radius:    var(--radius);
  text-decoration:  none;
  transition:       background 0.15s;
}
.feature-story .story-read-more a:hover {
  background: var(--color-primary-dark);
}

/* ── Separator between featured post and regular newswire ── */
.featured-separator {
  display:        flex;
  align-items:    center;
  gap:            var(--gap);
  margin:         var(--gap) 0;
}

.featured-separator::before,
.featured-separator::after {
  content:    "";
  flex:       1;
  height:     1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--color-border-strong) 30%,
    var(--color-border-strong) 70%,
    transparent 100%);
}

.featured-separator span {
  font-family:    var(--font-sans);
  font-size:      0.68rem;
  font-weight:    bold;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color:          var(--color-text-light);
  white-space:    nowrap;
}

/* ── Regular story ── */
.story-title {
  font-family:   var(--font-ui);
  font-size:     1.32rem;
  font-weight:   bold;
  margin-bottom: 5px;
}

.story-title a { color: var(--color-text); }
.story-title a:hover { color: var(--color-primary); text-decoration: none; }

.story-meta {
  font-family: var(--font-sans);
  font-size:   0.89rem;
  color:       var(--color-text-muted);
  margin-bottom: var(--gap-sm);
}

.story-meta a { color: var(--color-link); }

.story-image-wrap {
  margin:        var(--gap-sm) 0;
  border:        1px solid var(--color-border);
  border-radius: var(--radius);
  overflow:      hidden;
  max-width:     100%;
}

/* Base — full size, used on individual post page */
.story-image-wrap img {
  display:    block;
  width:      100%;
  max-width:  100%;
  height:     auto;
  object-fit: cover;
  object-position: center top;
}

/* Listing cards on index — 50% height, 50% width, left aligned */
.story .story-image-wrap {
  max-width: 50%;
  margin-left: 0;
  margin-right: auto;
}

.story .story-image-wrap img {
  max-height:      210px;
  object-position: center center;
}

/* Individual post page — full original image size, no cap */
.post-full {
  background:    var(--color-surface);
  border:        1px solid var(--color-border);
  border-radius: var(--radius);
  padding:       var(--gap);
  margin-bottom: var(--gap);
}

.post-full .story-image-wrap img {
  max-height: none;
  height:     auto;
  object-fit: initial;
}

/* Featured post full page (featured.html) — full size */
.feature-story .story-image-wrap img {
  max-height: none;
  object-position: center center;
}

/* Featured post on index listing — 75% height, centered */
#content .feature-story .story-image-wrap img {
  max-height:      360px;   /* 480 * 0.75 */
  object-fit:      cover;
  object-position: center center;
}

.story-body {
  font-size:   1.07rem;   /* set on the container so bare text nodes also inherit */
  line-height: 1.6;
}

.story-body p {
  margin-bottom: var(--gap-sm);
  font-size:     inherit;
  line-height:   inherit;
}

.story-location {
  font-family: var(--font-sans);
  font-size:   0.85rem;
  color:       var(--color-text);
  font-weight: bold;
  margin:      3px 0 var(--gap-sm);
}

.story-read-more {
  font-family: var(--font-sans);
  font-size:   0.95rem;
  margin-top:  var(--gap-sm);
}

.story-divider {
  border:  none;
  border-top: 1px dotted var(--color-border);
  margin: 0 0 var(--gap) 0;
  display: none; /* hidden — articles already have bottom margin */
}


/* ─── 13. PAGINATION ────────────────────────────────── */
#pagination {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  padding:         var(--gap-sm) var(--gap);
  background:      var(--color-surface);
  border:          1px solid var(--color-border);
  border-radius:   var(--radius);
  font-family:     var(--font-sans);
  font-size:       0.78rem;
  margin-top:      var(--gap);
}

.page-info { color: var(--color-text-muted); }


/* ─── 14. FOOTER ────────────────────────────────────── */
#site-footer {
  background:  var(--color-footer-bg);
  color:       var(--color-footer-text);
  margin-top:  var(--gap-lg);
  border-top:  3px solid var(--color-primary);
}

#footer-inner {
  max-width:   var(--max-width);
  margin:      0 auto;
  padding:     var(--gap-lg) var(--gap);
  display:     grid;
  grid-template-columns: repeat(2, 1fr);
  gap:         var(--gap-lg);
}

.footer-col h4 {
  color:         var(--color-footer-heading);
  font-family:   var(--font-sans);
  font-size:     0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--gap-sm);
  padding-bottom: 4px;
  border-bottom: 1px solid #444;
}

.footer-col p,
.footer-col ul li {
  font-family: var(--font-sans);
  font-size:   0.78rem;
  line-height: 1.8;
}

.footer-col a {
  color: #aaa;
}
.footer-col a:hover { color: var(--color-primary-light); }

#footer-bottom {
  text-align:  center;
  padding:     var(--gap-sm) var(--gap);
  border-top:  1px solid #333;
  font-family: var(--font-sans);
  font-size:   0.72rem;
  color:       #666;
}


/* ─── 15. RESPONSIVE ────────────────────────────────── */
@media (max-width: 780px) {
  #wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "right";
  }
  #sidebar-right { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
  #footer-inner  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
  #wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "right";
  }
  #header-inner  { flex-direction: column; align-items: flex-start; }
  #main-nav      { margin-left: 0; }
  #footer-inner  { grid-template-columns: 1fr; }
  #sidebar-right { grid-template-columns: 1fr; }
}


/* ─── 16. COMMENTS ─────────────────────────────────── */

/* Comments section sits flush under the article,
   same width — no extra padding needed */
#comments-section {
  margin-top: var(--gap-lg);
}

/* ── Section heading ── */
.comments-heading {
  display:       flex;
  align-items:   center;
  gap:           var(--gap);
  padding:       8px var(--gap);
  background:    var(--color-surface-alt);
  border:        1px solid var(--color-border);
  border-left:   4px solid var(--color-border-strong);
  border-radius: var(--radius);
  margin-bottom: var(--gap);
}

.comments-heading h3 {
  font-family: var(--font-ui);
  font-size:   1rem;
  font-weight: bold;
  margin:      0;
  color:       var(--color-text);
}

.comment-count-badge {
  display:       inline-block;
  background:    var(--color-surface);
  border:        1px solid var(--color-border);
  color:         var(--color-text-muted);
  font-family:   var(--font-sans);
  font-size:     0.68rem;
  font-weight:   bold;
  padding:       2px 9px;
  border-radius: 10px;
}

/* ── Individual comment card ── */
.comment {
  background:    var(--color-surface);
  border:        1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--gap-sm);
  overflow:      hidden;
  box-shadow:    0 1px 3px rgba(0,0,0,0.05);
}

/* Header row: username · date · [delete] */
.comment-header {
  display:       flex;
  align-items:   center;
  gap:           var(--gap-sm);
  padding:       7px var(--gap);
  background:    var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
}

/* Username */
.comment-author {
  font-family: var(--font-sans);
  font-size:   0.82rem;
  font-weight: bold;
  color:       var(--color-text);
}

/* Separator dot between username and date */
.comment-author::after {
  content:      " ·";
  color:        var(--color-border-strong);
  font-weight:  normal;
  margin-left:  2px;
}

/* Date */
.comment-date {
  font-family: var(--font-sans);
  font-size:   0.72rem;
  color:       var(--color-text-muted);
}

/* Admin delete */
.comment-delete-form { margin-left: auto; }
.comment-delete-btn {
  background:    none;
  border:        1px solid #e0a09a;
  color:         #c62828;
  font-family:   var(--font-sans);
  font-size:     0.68rem;
  padding:       2px 8px;
  border-radius: var(--radius);
  cursor:        pointer;
  transition:    background 0.15s, color 0.15s;
  white-space:   nowrap;
}
.comment-delete-btn:hover { background: #c62828; color: #fff; }

/* Comment text */
.comment-body {
  padding:     12px var(--gap);
  font-family: var(--font-body);
  font-size:   1.07rem;
  line-height: 1.65;
  color:       var(--color-text);
  white-space: pre-wrap;
  word-break:  break-word;
}

/* ── No comments yet ── */
.no-comments {
  padding:       var(--gap) var(--gap-lg);
  font-family:   var(--font-sans);
  font-size:     0.82rem;
  color:         var(--color-text-light);
  font-style:    italic;
  background:    var(--color-surface);
  border:        1px dashed var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--gap);
  text-align:    center;
}

/* ── Comment form — full width of the post column ── */
.comment-form-wrap {
  background:    var(--color-surface);
  border:        1px solid var(--color-border);
  border-top:    3px solid var(--color-primary);
  border-radius: var(--radius);
  padding:       var(--gap) var(--gap);
  margin-top:    var(--gap);
  /* Ensure it spans the full content column width */
  box-sizing:    border-box;
  width:         100%;
}

.comment-form-wrap h4 {
  font-family:   var(--font-ui);
  font-size:     0.95rem;
  font-weight:   bold;
  margin-bottom: var(--gap-sm);
  color:         var(--color-text);
}

/* Textarea fills the full form width */
.comment-form-wrap textarea {
  display:       block;
  width:         100%;
  box-sizing:    border-box;
  min-height:    120px;
  padding:       10px 12px;
  font-family:   var(--font-body);
  font-size:     0.9rem;
  color:         var(--color-text);
  background:    var(--color-bg);
  border:        1px solid var(--color-border-strong);
  border-radius: var(--radius);
  resize:        vertical;
  line-height:   1.55;
  transition:    border-color 0.15s, box-shadow 0.15s;
}
.comment-form-wrap textarea:focus {
  outline:      none;
  border-color: var(--color-primary);
  box-shadow:   0 0 0 2px rgba(192,57,43,0.12);
}

.comment-form-footer {
  display:     flex;
  align-items: center;
  gap:         var(--gap);
  margin-top:  var(--gap-sm);
  flex-wrap:   wrap;
}

.comment-anon-note {
  font-family: var(--font-sans);
  font-size:   0.72rem;
  color:       var(--color-text-light);
  font-style:  italic;
}

#btn-comment-submit {
  background:    var(--color-primary);
  color:         #fff;
  font-family:   var(--font-sans);
  font-size:     0.82rem;
  font-weight:   bold;
  padding:       8px 22px;
  border:        none;
  border-radius: var(--radius);
  cursor:        pointer;
  transition:    background 0.15s;
}
#btn-comment-submit:hover { background: var(--color-primary-dark); }

/* ── Comment count on listing cards ── */
.story-comment-count {
  font-family: var(--font-sans);
  font-size:   0.72rem;
  color:       var(--color-text-light);
  margin-left: var(--gap-sm);
}
.story-comment-count a {
  color:           var(--color-text-light);
  text-decoration: none;
}
.story-comment-count a:hover {
  color:           var(--color-link);
  text-decoration: underline;
}

/* ── Flash messages ── */
.comment-flash {
  padding:       var(--gap-sm) var(--gap);
  border-radius: var(--radius);
  margin-bottom: var(--gap-sm);
  font-family:   var(--font-sans);
  font-size:     0.82rem;
}
.comment-flash.success {
  background: #eaf5ea; border: 1px solid #7dba7d;
  border-left: 3px solid #3a9a3a; color: #2d6e2d;
}
.comment-flash.error {
  background: #fdf0ee; border: 1px solid #e0a09a;
  border-left: 3px solid var(--color-primary); color: #922b21;
}

/* ─── 17. USER BAR — all logged-in roles ────────────── */

/* Base bar */
#user-bar {
  font-family:   var(--font-sans);
  font-size:     0.75rem;
  border-bottom: 2px solid transparent;
}

#user-bar-inner {
  max-width:   var(--max-width);
  margin:      0 auto;
  padding:     5px var(--gap);
  display:     flex;
  align-items: center;
  gap:         10px;
  flex-wrap:   wrap;
}

/* ── Role colour themes ── */
.user-bar-admin {
  background:   #1e3a1e;
  border-color: #2e7d32;
  color:        #c8e6c9;
}
.user-bar-group {
  background:   #1a2a3a;
  border-color: #2e6da4;
  color:        #bbdefb;
}
.user-bar-commenter {
  background:   #2a2218;
  border-color: #8a6d00;
  color:        #ffe082;
}

/* Username + role pill */
#user-bar-who {
  white-space: nowrap;
  display:     flex;
  align-items: center;
  gap:         6px;
}
#user-bar-who strong { color: #fff; }

.user-bar-role-pill {
  font-size:     0.62rem;
  font-weight:   bold;
  padding:       1px 7px;
  border-radius: 8px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.role-admin     { background: #2e7d32; color: #fff; }
.role-group     { background: #2e6da4; color: #fff; }
.role-commenter { background: #8a6d00; color: #fff; }

/* Nav links */
#user-bar-nav {
  display:  flex;
  gap:      4px;
  flex-wrap: wrap;
}

#user-bar-nav a {
  display:         inline-flex;
  align-items:     center;
  gap:             4px;
  padding:         2px 9px;
  border-radius:   var(--radius);
  text-decoration: none;
  white-space:     nowrap;
  transition:      background 0.15s;
  border:          1px solid rgba(255,255,255,0.2);
  color:           inherit;
}
#user-bar-nav a:hover {
  background:      rgba(255,255,255,0.15);
  text-decoration: none;
  color:           #fff;
}

/* Pending count badge */
.user-bar-badge {
  display:       inline-block;
  background:    #e6a817;
  color:         #1a1a1a;
  font-size:     0.62rem;
  font-weight:   bold;
  padding:       0 5px;
  border-radius: 8px;
  line-height:   1.5;
}

/* Pending posts notice */
#user-bar-pending {
  background:    #856404;
  color:         #fff8e1;
  padding:       2px 10px;
  border-radius: var(--radius);
  font-weight:   bold;
  white-space:   nowrap;
}
#user-bar-pending a {
  color:           #ffe082;
  text-decoration: underline;
}
#user-bar-pending a:hover { color: #fff; }

/* Logout — pushed to far right, works as a plain link */
#user-bar-logout {
  margin-left:     auto;
  display:         inline-block;
  padding:         2px 12px;
  border:          1px solid rgba(255,255,255,0.3);
  border-radius:   var(--radius);
  color:           rgba(255,255,255,0.7);
  text-decoration: none;
  font-size:       0.72rem;
  white-space:     nowrap;
  transition:      background 0.15s, color 0.15s, border-color 0.15s;
}
#user-bar-logout:hover {
  background:    var(--color-primary);
  border-color:  var(--color-primary);
  color:         #fff;
  text-decoration: none;
}

/* ── Pencil toggle in sidebar links title ── */
.links-edit-toggle {
  float:       right;
  cursor:      pointer;
  font-size:   0.78rem;
  padding:     0 4px;
  border-radius: 2px;
  color:       rgba(255,255,255,0.7);
  transition:  color 0.15s, background 0.15s;
  user-select: none;
}
.links-edit-toggle:hover {
  color:      #fff;
  background: rgba(255,255,255,0.15);
}

/* ── Commenter star badge ── */
.commenter-star {
  color:       #1a1a1a;
  font-size:   0.72rem;
  margin-left: 3px;
  vertical-align: middle;
  title:       "Registered commenter";
}

/* Inline admin bar logout link (moderation, featured, editpost, siteadmin) */
.admin-bar-logout-link {
  background:    transparent;
  border:        1px solid #555;
  color:         #aaa;
  padding:       2px 10px;
  border-radius: var(--radius);
  font-family:   var(--font-sans);
  font-size:     0.72rem;
  text-decoration: none;
  white-space:   nowrap;
  transition:    background 0.15s, color 0.15s;
}
.admin-bar-logout-link:hover {
  background:   var(--color-primary);
  border-color: var(--color-primary);
  color:        #fff !important;
  text-decoration: none;
}

/* ─── About / Contact page article padding ──────────── */
/* Adds a little extra left whitespace inside the body text
   on content-only pages like about.html and contact.html  */
.page-content .story-body,
.page-content .story-title {
  padding-left: var(--gap);
}

/* ── Calendar event location ── */
.cal-event-location {
  display:     block;
  font-family: var(--font-sans);
  font-size:   0.72rem;
  color:       var(--color-text-light);
  margin-top:  2px;
}

/* ── Recent Comments sidebar block ── */
#recent-comments .rc-list {
  list-style: none;
  padding:    0;
  margin:     0;
}

.rc-item {
  padding:     6px var(--gap);
  border-bottom: 1px dotted var(--color-border);
  display:     flex;
  flex-direction: column;
  gap:         2px;
}
.rc-item:last-child { border-bottom: none; }

.rc-snippet {
  font-family:   var(--font-body);
  font-size:     0.78rem;
  color:         var(--color-text);
  line-height:   1.4;
  text-decoration: none;
}
.rc-snippet:hover {
  color:           var(--color-primary);
  text-decoration: underline;
}

.rc-meta {
  font-family: var(--font-sans);
  font-size:   0.68rem;
  color:       var(--color-text-light);
}

.rc-post-link {
  color:       var(--color-text-muted);
  text-decoration: none;
}
.rc-post-link:hover {
  color:           var(--color-link);
  text-decoration: underline;
}
