/*
 * Blogs (blogs_new.php): blogs.php's layout (Latest on the left, Top on the right, the same
 * width, posts about as wide as blogs.php's) in enrol_new.css's language: condensed uppercase
 * headings, a chamfered button and chips, on the site's ocean background (as blogs.php).
 * Latest is marked teal and Top orange, after blogs.php's two coloured columns.
 *
 * No panels inside panels: each column is just a heading, one row of chips or tabs (the same
 * height on both sides, so the first posts line up), then the posts. A post is a square-cornered
 * white bulletin on the background: avatar on the left; title, excerpt and a foot (who, when,
 * likes, comments) on the right, the foot sitting on the post's bottom edge.
 * Avatars keep .userava/.ub at 60px so worn borders (bordereffects.css) sit as they were drawn.
 */

/* Background: the site's ocean gradient, the same as blogs.php (nothing set here).
   The page sits in blogs.php's white #bodydiv, the two columns edge to edge inside it,
   each column on its own colour (teal Latest, orange Top) with white text. */
#bodydiv { position: relative; background-color: #fff; }

.bl-page {
  --panel:    oklch(0.98 0.01 265.35);
  --soft:     oklch(0.96 0.005 265);
  --soft-hi:  oklch(1 0 0);
  --sky-text: oklch(0.97 0.01 265);
  --sky-dim:  rgb(255 255 255 / 0.88);
  --sky-chip: rgb(0 0 0 / 0.08);
  --sky-chip-hi: rgb(0 0 0 / 0.14);
  --line:     oklch(0.91 0.008 265);
  --text:     oklch(0.21 0.02 265);
  --text-2:   oklch(0.40 0.018 265);
  --muted:    oklch(0.55 0.018 265);
  --night:    oklch(0.20 0.02 265);
  --teal:     #53cdb8;                 /* Latest */
  --orange:   #f08b33;                 /* Top, and the New post button */
  --on-sec:   rgb(0 0 0 / 0.18);       /* the selected chip, darker than its column */
  --display:  'Saira Condensed', 'Arial Narrow', 'Inter', sans-serif;
  --sans:     'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --cut:      7px;

  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.bl-page *, .bl-page *::before, .bl-page *::after { box-sizing: border-box; }
.bl-page h2, .bl-page h3, .bl-page p { margin: 0; color: inherit; font-family: inherit; }
.bl-page a { color: oklch(0.34 0.03 265.09); }
.bl-page :focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Chamfer: top-left and bottom-right corners cut */
.bl-cut {
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

/* ─── The two columns ───────────────────────────────────────────────────── */

.bl-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;   /* the sections run to the page's edges: no grey box around them */
}

.bl-col {
  min-width: 0;
  padding: 20px;
  background: var(--sec);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  color: var(--sky-text);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.22);  /* keeps the white text readable on the light colours */
}
.bl-col .bl-posts { text-shadow: none; }

.bl-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 38px;
  margin-bottom: 10px;
}

.bl-col-title {
  font-family: var(--display) !important;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bl-col-latest { --sec: var(--teal); border-radius: 4px; }
.bl-col-top    { --sec: var(--orange); }

.bl-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  background: var(--orange);
  color: #fff !important;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease-out;
}
.bl-btn:hover { background: #d97824; }

/* The row under each heading: hashtags on Latest, periods on Top. Same height on both sides. */
.bl-chips, .bl-tabs {
  display: flex;
  align-items: center;
  height: 32px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.bl-chips::-webkit-scrollbar, .bl-tabs::-webkit-scrollbar { display: none; }

.bl-chips { gap: 5px; }

.bl-chip {
  --cut: 5px;
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 28px;
  max-width: 160px;
  padding: 0 10px;
  background: var(--sky-chip);
  color: var(--sky-dim) !important;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 150ms ease-out;
}
.bl-chip:hover { background: var(--sky-chip-hi); color: var(--sky-text) !important; }
.bl-chip.is-on { background: var(--on-sec); color: #fff !important; }

/* Periods: plain words, the current one underlined */
.bl-tabs { gap: 18px; }

.bl-tab {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 100%;
  color: var(--sky-dim) !important;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease-out;
}
.bl-tab:hover { color: var(--sky-text) !important; }
.bl-tab.is-on { color: var(--sky-text) !important; }
.bl-tab.is-on::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 3px;
  background: currentColor;
}

/* ─── A post ────────────────────────────────────────────────────────────── */

.bl-posts { display: flex; flex-direction: column; gap: 18px; }

.bl-post {
  display: flex;
  color: var(--text);
  gap: 16px;
  min-height: 170px;           /* room for a worn border's full height, and four lines of excerpt */
  padding: 22px 20px 16px;
  background: #f6f6f6;
  border-radius: 4px;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 2px 8px, rgba(0, 0, 0, 0.04) 0px 4px 12px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 200ms ease-out;
}
.bl-post:hover { box-shadow: 0 0 0 2px rgb(255 255 255 / 0.35), rgba(0, 0, 0, 0.08) 0px 2px 8px, rgba(0, 0, 0, 0.04) 0px 4px 12px; }

.bl-post-ava { flex: none; display: block; width: 60px; height: 60px; }

/* Avatars: the size the worn-border art is drawn for */
.bl-page .userava {
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--soft);
  background-repeat: no-repeat;
  background-size: 180%;
  background-position: top;
}

/* Title, then the foot (who, when, likes, comments), then the excerpt */
.bl-post-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.bl-post-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-family: var(--sans) !important;  /* Inter */
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
}
.bl-post-title a {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-decoration: none;
}

.bl-adult {
  flex: none;
  padding: 1px 5px 0;
  background: oklch(0.55 0.21 27);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.bl-post-text {
  margin-top: 6px;
  color: var(--text-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bl-link { color: oklch(0.50 0.16 265); }

.bl-mention {
  padding: 0 4px;
  background: var(--c, var(--text));
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
}

.bl-spoiler {
  align-self: flex-start;
  margin-top: 8px;
  padding: 3px 10px 2px;
  background: var(--soft);
  color: var(--muted);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bl-post-foot {
  display: flex;
  align-items: baseline;      /* the level flame's bottom sits on the name's baseline, as on blogs.php */
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  color: var(--muted);
}
.bl-post-foot img { flex: none; display: block; margin-right: -6px; }  /* the name sits right against its flame, as on blogs.php */
.bl-author { font-weight: 700; text-decoration: none; margin: 0 !important; white-space: nowrap; }
.bl-author:hover { text-decoration: underline; }
.bl-post-foot time { white-space: nowrap; }
.bl-post-foot time::before { content: '\00B7'; margin-right: 6px; }

.bl-post-counts {
  display: flex;
  gap: 12px;
  margin-left: auto;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.bl-post-counts span { display: inline-flex; align-items: center; gap: 4px; }
.bl-ico { width: 12px; height: 12px; fill: var(--muted); }

.bl-post.is-new { animation: bl-in 300ms ease-out backwards; }
@keyframes bl-in { from { opacity: 0; } }

.bl-empty { padding: 16px 0 4px; color: var(--sky-dim); }

/* ─── Pager (foot of Latest) ────────────────────────────────────────────── */

.bl-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; }

.bl-pager-btn {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  background: var(--sky-chip);
  color: var(--sky-text) !important;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 150ms ease-out;
}
.bl-pager-btn:hover { background: var(--sky-chip-hi); }
.bl-pager-btn.is-off { opacity: 0.4; pointer-events: none; }

.bl-pager-now {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--sky-dim);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .bl-page, .bl-page * { animation: none !important; transition: none !important; }
}

/* ─── Smaller screens: one column, Latest first ─────────────────────────── */

@media (max-width: 899px) {
  .bl-columns { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 560px) {
  .bl-col { padding: 12px; }
  .bl-col-title { font-size: 24px; }
  .bl-posts { gap: 12px; }
  .bl-post { gap: 12px; padding: 20px 14px 12px; }
  .bl-post-foot { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .bl-post-ava, .bl-page .bl-post .userava { width: 45px; height: 45px; }
}
