/* =====================================================================
   DeMolay România — stylesheet (the whole site, bulletin included)
   Read this top-to-bottom; it's organized in the order things appear
   on the page. Comments explain what each block does.
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. DESIGN TOKENS
   These CSS variables are the colors, fonts, and spacings used
   everywhere. Change them here and the whole site updates.
   --------------------------------------------------------------------- */
:root {
  /* Colors — the jurisdiction's palette: black, gold, red.
     (v1.2: the cream "newspaper" palette is fully retired — every page
     is dark now. The old values live in git history if ever needed.) */
  --paper:        #161b29;   /* page background — deep slate-blue, not black */
  --paper-edge:   #2f3850;   /* borders between dark surfaces          */
  --paper-tint:   #1f263a;   /* cards / raised surfaces                */
  --ink:          #f2f2ef;   /* main text — clean near-white           */
  --ink-soft:     #c4c8d4;   /* secondary text — cool, bright enough   */
  --rule:         #586079;   /* horizontal rules — quiet, not shouty   */
  --accent:       #e0484a;   /* red, tuned for the bluer backgrounds   */

  /* Typography — ONE font for the whole site (v2.12): the device's own
     clean sans (Segoe UI on Windows, San Francisco on Apple, Roboto on
     Android). Titles are the same font in bold. The old display and
     label tokens still exist so the rules that use them keep working,
     but they are simply aliases of --font-body now. */
  --font-body:    'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mast:    var(--font-body);
  --font-label:   var(--font-body);

  /* Layout */
  --max-width:    1180px;    /* the page never gets wider than this    */
  --gap:          2rem;
}


/* ---------------------------------------------------------------------
   2. RESET & BASE
   --------------------------------------------------------------------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}


/* ---------------------------------------------------------------------
   3. TOP BAR
   Slim strip above the masthead; future home of user menu.
   --------------------------------------------------------------------- */
/* Removed in v3.0: the top bar (.topbar) no longer exists — replaced by the card nav. */


/* ---------------------------------------------------------------------
   4. MASTHEAD
   --------------------------------------------------------------------- */
.masthead {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 1.25rem;
  text-align: center;
  border-bottom: 4px double var(--rule);
}

.masthead__title {
  font-family: var(--font-mast);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 1;
  margin: 0.6rem 0;
  letter-spacing: 0.01em;
}


/* ---------------------------------------------------------------------
   5. PAPER GRID
   3 columns on desktop. Articles and sidebars live in the same grid;
   each item declares its column span via a class.
   --------------------------------------------------------------------- */
.paper {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding: 0 1.25rem;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}


/* ---------------------------------------------------------------------
   6. STORIES (regular articles)
   --------------------------------------------------------------------- */
.story {
  border-top: 2px solid var(--rule);
  padding-top: 1rem;
  min-width: 0;        /* keeps long words from breaking the grid */
}

/* The lead story takes 2 of the 3 columns on wide screens */
.story--lead    { grid-column: span 2; border-top: 4px double var(--rule); }
.story--feature { grid-column: span 2; border-top: 3px solid var(--rule);  }

/* Section label above each headline */
.story__kicker {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.story__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.15;
  margin: 0 0 0.4rem;
  letter-spacing: -0.005em;
}

.story--lead    .story__title { font-size: clamp(2rem, 4.2vw, 3rem); }
.story--feature .story__title { font-size: clamp(1.6rem, 3vw, 2.2rem); }

.story__byline {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

/* Artwork placeholder — replace with <img> when ready */
.story__art {
  background: repeating-linear-gradient(
    45deg,
    var(--paper-edge),
    var(--paper-edge) 6px,
    var(--paper) 6px,
    var(--paper) 12px
  );
  border: 1px solid var(--ink);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-label);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.story__body p {
  margin: 0 0 0.9rem;
  text-align: justify;
  hyphens: auto;
}

.story__lede {
  font-size: 1.15rem;
  font-style: italic;
  text-align: left !important;
}


/* ---------------------------------------------------------------------
   7. SIDEBARS
   Visually distinct from articles: tinted background, full border,
   used for "DeMolay of the Month", schedule, pull quotes, stats.
   This is what creates the page's newspaper rhythm.
   --------------------------------------------------------------------- */
.sidebar {
  background: var(--paper-tint);
  border: 1px solid var(--ink);
  padding: 1.25rem 1.1rem;
  /* Sidebars sit inside the same grid as stories — span 1 column. */
  grid-column: span 1;
  display: flex;
  flex-direction: column;
}

.sidebar__label {
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 0.45rem 0;
  margin-bottom: 0.9rem;
}

.sidebar__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0 0 0.7rem;
  text-align: center;
  letter-spacing: -0.005em;
}

/* --- DeMolay of the Month variant --- */
.profile__photo {
  background: repeating-linear-gradient(
    45deg,
    var(--paper-edge),
    var(--paper-edge) 6px,
    var(--paper) 6px,
    var(--paper) 12px
  );
  border: 1px solid var(--ink);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-label);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}

.profile__name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.4rem;
  text-align: center;
  margin: 0 0 0.2rem;
}

.profile__meta {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
}

.profile__quote {
  margin: 0;
  font-style: italic;
  text-align: center;
  font-size: 1rem;
  border-top: 1px solid var(--paper-edge);
  border-bottom: 1px solid var(--paper-edge);
  padding: 0.7rem 0.3rem;
}

/* --- Initiation schedule variant --- */
.schedule {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
}

.schedule li {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--paper-edge);
  font-size: 0.98rem;
}

.schedule li:last-child { border-bottom: none; }

.schedule__date {
  font-family: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.schedule__what {
  color: var(--ink-soft);
  font-style: italic;
  text-align: right;
}

/* --- Pull quote variant --- */
.sidebar--quote {
  justify-content: center;
  text-align: center;
}

.pullquote {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  line-height: 1.3;
  margin: 0.5rem 0;
}

.pullquote__attr {
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin: 0.5rem 0 0;
}

/* --- Numbers / stats variant --- */
.stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dashed var(--paper-edge);
  padding: 0.7rem 0;
}

.stat:last-child { border-bottom: none; }

.stat__num {
  font-family: var(--font-mast);
  color: var(--accent);
  font-size: 2.2rem;
  line-height: 1;
}

.stat__label {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: right;
  color: var(--ink-soft);
  max-width: 55%;
}


/* ---------------------------------------------------------------------
   8. EVENTS STRIP
   --------------------------------------------------------------------- */
.events {
  max-width: var(--max-width);
  margin: 3rem auto 0;
  padding: 1.5rem 1.25rem;
  border-top: 4px double var(--rule);
  border-bottom: 4px double var(--rule);
}

.events__title {
  font-family: var(--font-label);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 1.25rem;
}

.events__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.event {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.event__date {
  border: 1px solid var(--ink);
  padding: 0.4rem 0.7rem;
  text-align: center;
  font-family: var(--font-label);
  letter-spacing: 0.1em;
  background: var(--paper-edge);
  flex-shrink: 0;
}

.event__day {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

.event__month {
  display: block;
  font-size: 0.7rem;
  margin-top: 0.2rem;
}

.event__info h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.event__info p {
  margin: 0;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.95rem;
}


/* ---------------------------------------------------------------------
   9. FOOTER
   --------------------------------------------------------------------- */
.colophon {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.colophon__title {
  font-family: var(--font-mast);
  color: var(--ink);
  font-size: 2rem;
  margin: 0 0 0.25rem;
}

.colophon__small {
  font-size: 0.8rem;
  margin-top: 1rem;
  opacity: 0.7;
}


/* ---------------------------------------------------------------------
   10. RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 900px) {
  .paper { grid-template-columns: repeat(2, 1fr); }
  .story--lead, .story--feature { grid-column: span 2; }
  .events__list { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .paper { grid-template-columns: 1fr; gap: 1.5rem; }
  .story--lead, .story--feature { grid-column: span 1; }
}


/* ---------------------------------------------------------------------
   11. TOPBAR — interactive states
   The topbar's inner content is rendered by auth.js. Style the bits
   it produces: user label, action buttons.
   --------------------------------------------------------------------- */
/* Removed in v3.0: the topbar's user label, buttons and badge no longer exist. */


/* ---------------------------------------------------------------------
   12. SUB-PAGE LAYOUT — login & publish
   These pages don't show a full grid, they show a centered card.
   --------------------------------------------------------------------- */


/* A smaller masthead for sub-pages (login, publish) — same identity,
   less visual weight than the homepage. */
.masthead--small { padding: 1.5rem 1.25rem 1rem; }

.card-wrap {
  max-width: 560px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
}

.card-wrap--wide { max-width: 880px; }

.card {
  background: var(--paper-tint);
  border: 1px solid var(--ink);
  padding: 2rem 1.75rem;
}

.card__label {
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 0.45rem 0;
  margin: 0 0 1rem;
}

.card__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 2rem;
  text-align: center;
  margin: 0 0 0.4rem;
}

.card__lede {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}

/* ---------------------------------------------------------------------
   13. FORMS & BUTTONS
   --------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 1rem; }

.form__row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form__field--grow { flex: 1 1 200px; }

.form__label {
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.form input[type=text],
.form input[type=password],
.form input[list],
.form select {
  font-family: var(--font-body);
  font-size: 1.05rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.6rem 0.75rem;
  width: 100%;
}

.form input:focus,
.form select:focus,
.editor__body:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form__error {
  color: var(--accent);
  font-style: italic;
  margin: 0;
  min-height: 1.2em;
}

.form__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}


.btn--ghost {
  background: var(--paper);
  color: var(--ink);
}


/* ---------------------------------------------------------------------
   14. EDITOR
   --------------------------------------------------------------------- */
.editor {
  border: 1px solid var(--ink);
  background: var(--paper);
}

.editor__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--ink);
  background: var(--paper-edge);
}

.editor__toolbar button {
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  min-width: 2rem;
}


.editor__sep {
  display: inline-block;
  width: 1px;
  background: var(--paper-edge);
  margin: 0 0.25rem;
}

.editor__body {
  min-height: 280px;
  padding: 1rem 1.2rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Show a subtle placeholder when the editor is empty. */
.editor__body:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-soft);
  font-style: italic;
  pointer-events: none;
}

.editor__body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.75rem 0;
  border: 1px solid var(--ink);
}

.editor__body blockquote {
  margin: 0.75rem 0;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--ink-soft);
}

.editor__body mark {
  background: #ffe98c;
  padding: 0 0.15em;
}

.editor__body h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 1rem 0 0.5rem;
}

/* Hero artwork upload */
.hero-upload {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.hero-upload__preview {
  width: 220px;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--ink);
  background: repeating-linear-gradient(
    45deg,
    var(--paper-edge),
    var(--paper-edge) 6px,
    var(--paper) 6px,
    var(--paper) 12px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-upload__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ---------------------------------------------------------------------
   15. ARTICLE BODY EXTRAS — published-article rendering
   These rules apply inside .story__body when articles include images,
   highlights, or quotes (output from the editor).
   --------------------------------------------------------------------- */
.story__art-img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--ink);
  margin-bottom: 1rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.story__body img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--ink);
  margin: 0.75rem 0;
}

.story__body mark {
  background: #ffe98c;
  padding: 0 0.15em;
}

.story__body blockquote {
  margin: 0.75rem 0;
  padding: 0.4rem 1rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--ink-soft);
}

.story__body h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 1rem 0 0.4rem;
}


/* Invisible grid cells used to preserve layout when articles are missing. */
.grid-spacer { grid-column: span 1; }
.grid-spacer--wide { grid-column: span 2; }


/* ---------------------------------------------------------------------
   16. PER-STORY ACTIONS (archive / delete buttons under each card)
   --------------------------------------------------------------------- */
.story__actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--rule);
}

/* Compact button variant for inline placement on a story card. */
.btn--small {
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

/* Destructive action — used for hard-delete. Stays restrained so it
   doesn't scream off a page that's mostly serif text. */
.btn--danger {
  background: transparent;
  color: #8a1a1a;
  border: 1px solid #8a1a1a;
}

/* The headline link inside a story card. Inherits the heavy display
   font from .story__title; we only strip the underline + color. */
.story__title-link {
  color: inherit;
  text-decoration: none;
}
.story__title-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}


/* ---------------------------------------------------------------------
   17. ARTICLE READER PAGE (article.html)
   --------------------------------------------------------------------- */
.reader {
  max-width: 720px;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
}

.reader__article {
  background: var(--paper);
  padding: 1.5rem 0;
}

.reader__kicker {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.reader__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1.1;
  margin: 0 0 0.6rem;
}

.reader__byline {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
}

.reader__hero {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 1.2rem;
  border: 1px solid var(--ink);
}


.reader__body p { margin: 0 0 0.9rem; }

/* Banner shown above an archived article. Subtle warm tint so it reads
   as "context", not "warning". */
.reader__archive-banner {
  background: #f1e6c8;
  border: 1px solid var(--accent);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  border-radius: 2px;
}
.reader__archive-banner a {
  color: var(--accent);
  font-weight: 600;
}

/* Friendly "we couldn't find this article" page. */
.reader__notfound {
  text-align: center;
  padding: 2.5rem 1rem;
}
.reader__notfound p {
  color: var(--ink-soft);
  font-style: italic;
  margin: 0.6rem 0 1.4rem;
}

/* Action row at the bottom of the reader (archive / restore / delete). */
.reader__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.reader__actions-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  margin-right: 0.5rem;
  text-transform: uppercase;
}


/* ---------------------------------------------------------------------
   18. ADMIN PANEL (admin.html)
   --------------------------------------------------------------------- */
.admin {
  max-width: 980px;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
}

.admin__section {
  margin-bottom: 2.5rem;
}

.admin__heading {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--ink);
}

.admin__hint {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.admin__empty {
  color: var(--ink-soft);
  font-style: italic;
  margin: 0.5rem 0;
}

/* Stats grid: small boxes with a big number and a tiny label. */
.admin__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.admin__stat {
  background: var(--paper-tint);
  border: 1px solid var(--rule);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.admin__stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.admin__stat-label {
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Tables (chapters + articles). */
.admin__table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.admin__table th,
.admin__table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.admin__table th {
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper-tint);
}


.admin__table-actions {
  white-space: nowrap;
  text-align: right;
}

.admin__table code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.04);
  padding: 0.05rem 0.3rem;
  border-radius: 2px;
}


/* ---------------------------------------------------------------------
   19. ARCHIVE — CABINET / DRAWER / FOLDER
   Each "page" of results is a drawer, and each archived article is a
   folder inside it. (These rules once drew a wooden cabinet with manila
   folders; section 49 restyles both as dark cards, the names stayed.)
   --------------------------------------------------------------------- */
.cabinet {
  max-width: 980px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.25rem;
}

.cabinet__intro { margin-bottom: 1.25rem; }

.cabinet__heading {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.cabinet__lede {
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
  max-width: 60ch;
}

.cabinet__empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* The drawer itself: faux-wood frame around the folders. */
.drawer {
  background:
    linear-gradient(180deg, #6b4a25 0%, #5a3d1e 100%);
  border: 2px solid #3d2811;
  border-radius: 4px;
  padding: 1rem 1.1rem 1.4rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 4px 0 #3d2811,
    0 6px 14px rgba(0,0,0,0.25);
  margin-bottom: 1.5rem;
}

/* Drawer header: a label plate flanked by two metal "pulls". */
.drawer__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.drawer__label {
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: #f4ecd8;
  background: #2c1d0c;
  padding: 0.35rem 1rem;
  border: 1px solid #14080a;
  border-radius: 2px;
  text-transform: uppercase;
}

.drawer__pull {
  width: 48px;
  height: 14px;
  background:
    linear-gradient(180deg, #d9c89a 0%, #b89d63 50%, #8a7338 100%);
  border: 1px solid #4a3614;
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

/* Folders: lay them out in a responsive grid inside the drawer. */
.drawer__folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

/* A single manila folder. It overlaps the drawer floor a little. */
.folder {
  position: relative;
  background: #e9d8a6; /* manila */
  border: 1px solid #b89a55;
  border-top-left-radius: 2px;
  border-top-right-radius: 14px 22px; /* the cut corner of a real folder */
  padding: 1.4rem 0.9rem 0.8rem;
  min-height: 150px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.4),
    0 2px 0 rgba(0,0,0,0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.folder:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.4),
    0 5px 0 rgba(0,0,0,0.25),
    0 8px 14px rgba(0,0,0,0.2);
}

/* The angled tab on top of the folder, like a real label tab. */
.folder__tab {
  position: absolute;
  top: -10px;
  left: 14px;
  background: #d2b772;
  border: 1px solid #8a6f2c;
  border-bottom: none;
  padding: 0.15rem 0.7rem;
  font-family: var(--font-label);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: #3a2911;
  text-transform: uppercase;
  border-radius: 2px 8px 0 0;
}

.folder__link {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.folder__kicker {
  font-family: var(--font-label);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.folder__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.folder__link:hover .folder__title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.folder__meta {
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.4;
}

/* Master-only "×" delete on a folder. Kept tiny and discreet. */
.folder__delete {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 1px solid transparent;
  color: #8a1a1a;
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 2px;
  padding: 0;
}

/* Drawer pagination row (Sertarul anterior / următor). */
.cabinet__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1rem;
}

.cabinet__nav-pos {
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}

.cabinet__nav .btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}


/* ---------------------------------------------------------------------
   20. ACCESSIBILITY HELPERS
   --------------------------------------------------------------------- */

/* Skip-link: invisible until focused with the keyboard. Lets screen
   reader and keyboard users jump past the topbar+masthead. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  text-decoration: none;
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 0 0 4px 4px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Make the focus ring visible everywhere but ONLY for keyboard users
   (not mouse clicks). `:focus-visible` is what every modern browser
   uses for that. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Respect the user's "reduced motion" preference (system-level toggle). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}


/* ---------------------------------------------------------------------
   21. STICKY TOPBAR + SCROLL SHADOW
   --------------------------------------------------------------------- */
/* Removed in v3.0: the topbar this styled no longer exists. */


/* ---------------------------------------------------------------------
   22. TOAST NOTIFICATIONS
   --------------------------------------------------------------------- */
.toast-host {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 200;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 220px;
  max-width: 340px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  border-left: 4px solid var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  border-radius: 2px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  cursor: pointer;
}
.toast--visible {
  opacity: 1;
  transform: translateY(0);
}
.toast--leaving {
  opacity: 0;
  transform: translateY(4px);
}

.toast--success { border-left-color: #2e7d32; }
.toast--error   { border-left-color: #8a1a1a; }
.toast--info    { border-left-color: var(--accent); }


/* ---------------------------------------------------------------------
   23. CONFIRM MODAL
   --------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 10, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 150;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.modal-overlay--visible { opacity: 1; }

.modal {
  background: var(--paper);
  border: 1px solid var(--ink);
  max-width: 440px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.4rem;
}

.modal__body {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}


/* ---------------------------------------------------------------------
   24. FEED LOADING + EMPTY STATES
   (The spinner was replaced by skeleton loading in v3.1, §84.2.)
   --------------------------------------------------------------------- */
.feed-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-soft);
  font-style: italic;
}
.feed-empty__title {
  font-family: var(--font-display);
  font-style: normal;
  color: var(--ink);
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}


/* ---------------------------------------------------------------------
   25. EDITOR STATUSBAR (word count + draft status)
   --------------------------------------------------------------------- */
.editor__statusbar {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-top: 1px solid var(--rule);
  background: rgba(0, 0, 0, 0.02);
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.editor__counter      { text-transform: uppercase; }
.editor__draft-status { font-style: italic; }


/* ---------------------------------------------------------------------
   26. DESIGNER WATERMARK (footer)
   --------------------------------------------------------------------- */
.colophon__designer {
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0.6rem 0 0.2rem;
}


/* ---------------------------------------------------------------------
   27. SUB-PAGE RESPONSIVE TWEAKS
   --------------------------------------------------------------------- */
@media (max-width: 600px) {
  .form__row { flex-direction: column; }
  .hero-upload__preview { width: 100%; }
  .reader__title { font-size: 1.8rem; }

  .admin__table th,
  .admin__table td { padding: 0.4rem 0.4rem; font-size: 0.85rem; }
  .admin__table-actions { white-space: normal; text-align: left; }

  .drawer__folders { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .folder { min-height: 120px; padding: 1.2rem 0.6rem 0.6rem; }
  .folder__title { font-size: 0.92rem; }

  .toast-host { left: 1rem; right: 1rem; bottom: 1rem; align-items: stretch; }
  .toast { max-width: none; }

  .modal { padding: 1.1rem; }
  .modal__title { font-size: 1.2rem; }
}


/* ---------------------------------------------------------------------
   28. PRINT STYLESHEET
   When someone hits Ctrl+P on an article or the feed, give them a real
   newspaper-style printable page: black text on white, no topbar, no
   buttons, no sidebars cluttering the read.
   --------------------------------------------------------------------- */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.5;
  }

  /* Hide interactive chrome that doesn't belong on paper. */
  .skip-link, .toast-host, .modal-overlay,
  .story__actions, .reader__actions,
  .events,
  .cabinet__nav, .folder__delete,
  .editor__statusbar, .editor__toolbar, .form__actions,
  .colophon__small {
    display: none !important;
  }

  /* Make the masthead crisp in print. */
  .masthead { background: #fff; color: #000; padding: 1cm 0 0.5cm; }
  .masthead__title { color: #000; }

  /* Page-aware grid: drop the asymmetric grid for a single column read. */
  .paper { display: block; padding: 0; background: #fff; }
  .story, .reader__article, .folder, .sidebar, .feed-empty {
    break-inside: avoid;
    background: #fff;
    border: none;
    box-shadow: none;
    margin-bottom: 0.7cm;
  }

  .story__art { display: none; }
  .story__art-img, .reader__hero { max-width: 100%; }

  /* Link URLs are useful on paper. */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #444;
  }
  /* But not for anchor-only links. */
  a[href^="#"]::after { content: ""; }

  /* Reader page: full-width article. */
  .reader { max-width: none; margin: 0; padding: 0; }

  .colophon {
    border-top: 1px solid #000;
    margin-top: 1cm;
    padding-top: 0.4cm;
    color: #000;
    background: #fff;
  }
}


/* ---------------------------------------------------------------------
   29. TOPBAR VERSION LINK
   The version number sits quietly at the end of the topbar actions. It
   links to the patch-notes page — discreet on purpose ("lowkey").
   --------------------------------------------------------------------- */
/* Removed in v3.0: the topbar (and its version link) no longer exists. */


/* ---------------------------------------------------------------------
   30. SUPPORT PAGE (support.html)
   --------------------------------------------------------------------- */
/* Removed in v3.0: support.html now uses the generic .card* classes. */


/* ---------------------------------------------------------------------
   31. PATCH NOTES
   --------------------------------------------------------------------- */
/* Removed in v3.2: the old patch-notes PAGE rule. The list now lives in
   the master-only dialog and is styled with it (".patchnotes", section 56). */


/* ---------------------------------------------------------------------
   32. RESPONSIVE TWEAKS FOR SUPPORT + PATCH NOTES
   --------------------------------------------------------------------- */
/* Removed in v3.0: the support and patch-notes page rules these tweaked no longer exist. */


/* ---------------------------------------------------------------------
   33. EDITABLE SIDEBARS (master-only inline edit buttons)
   --------------------------------------------------------------------- */
.sidebar { position: relative; }

/* Small pencil button in the top-right corner of each sidebar.
   Only rendered (in feed.js) for the master account. */
.sidebar__edit {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  background: var(--paper);
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 2px;
  z-index: 2;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sidebar__edit:hover,
.sidebar__edit:focus-visible {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

/* When the featured DeMolay has a real photo, replace the PHOTO
   placeholder with a square image. */
.profile__photo--img {
  width: 100%;
  height: 160px;
  display: block;
  object-fit: cover;
  background: none;
  border: 1px solid var(--ink);
  padding: 0;
}

/* Initiation calendar: empty state + the "+ Adaugă inițiere" button
   + per-row cancel × button. */
.schedule__empty {
  margin: 0.3rem 0 0.5rem;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.schedule li { position: relative; }

.schedule__cancel {
  margin-left: 0.4rem;
  padding: 0 0.35rem;
  background: transparent;
  border: 1px solid transparent;
  color: #8a1a1a;
  font-size: 1.05rem;
  line-height: 1;
  border-radius: 2px;
  cursor: pointer;
}

.schedule__add {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.3rem 0.7rem;
  font-family: var(--font-label);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  border: 1px dashed var(--ink-soft);
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 2px;
}
.schedule__add:hover,
.schedule__add:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  border-style: solid;
  color: var(--paper);
}


/* ---------------------------------------------------------------------
   34. EVENTS STRIP (bottom of homepage)
   --------------------------------------------------------------------- */
.events__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.events__empty {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  padding: 1.5rem 1rem;
  margin: 0;
}

/* Per-event cancel × in the top corner. Hidden unless author or master. */
.event { position: relative; }

.event__cancel {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid transparent;
  color: #8a1a1a;
  font-size: 1.05rem;
  line-height: 1;
  border-radius: 2px;
  cursor: pointer;
}

.event__badge {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  background: var(--accent);
  color: var(--paper);
  padding: 0.1rem 0.45rem;
  margin-bottom: 0.25rem;
  border-radius: 2px;
}


/* ---------------------------------------------------------------------
   35. FORM MODAL (DM.ui.formModal)
   The newspaper-styled version of a dialog with input fields.
   --------------------------------------------------------------------- */
.modal--form {
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal__form .modal__field {
  display: block;
  margin-bottom: 0.85rem;
}

.modal__form .modal__label {
  display: block;
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.25rem;
}

.modal__input,
.modal__textarea,
.modal__select {
  width: 100%;
  padding: 0.5rem 0.7rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-sizing: border-box;
}
.modal__input:focus,
.modal__textarea:focus,
.modal__select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.modal__textarea {
  resize: vertical;
  min-height: 4rem;
  line-height: 1.5;
}

/* Image picker: square preview + side-by-side controls. */
.modal__image {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}
.modal__image-preview {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-tint);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.modal__image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.modal__image-empty {
  font-family: var(--font-label);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
  padding: 0.5rem;
}
.modal__image-controls {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  justify-content: center;
  flex: 1;
}
.modal__image-controls .btn--small {
  text-align: center;
}


/* ---------------------------------------------------------------------
   36. PRINT TWEAKS for the new bits
   --------------------------------------------------------------------- */
@media print {
  .sidebar__edit, .schedule__add, .schedule__cancel,
  .event__cancel, #events-add, .events__header > button {
    display: none !important;
  }
}


/* ---------------------------------------------------------------------
   37. LANDING PAGE (index.html — the public face of the jurisdiction)
   The landing page reuses the design tokens but speaks "institutional",
   not "newspaper": sections are roomy, photos sit in framed slots the
   master can edit in place.
   --------------------------------------------------------------------- */
.landing {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.landing__kicker {
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

.landing__hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--gap);
  align-items: center;
  padding: 3rem 0 2.75rem;
  border-bottom: 1px solid var(--rule);
}

.landing__headline {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.12;
  margin: 0 0 1rem;
}

.landing__lede {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

.landing__cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.landing__section {
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--paper-edge);
}

.landing__section--tint {
  background: var(--paper-tint);
  border: 1px solid var(--paper-edge);
  border-bottom: 1px solid var(--paper-edge);
  padding: 2.25rem 1.75rem;
  margin: 2rem 0;
}

.landing__heading {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin: 0 0 1rem;
}

.landing__intro {
  max-width: 46rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin: 0 0 1rem;
}

.landing__two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--gap);
  align-items: start;
}

.landing__two-col--reverse {
  grid-template-columns: 0.85fr 1.15fr;
}

/* The seven cardinal virtues — numbered with roman numerals. */
.landing__virtues {
  list-style: none;
  counter-reset: virtue;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.1rem 2rem;
}

.landing__virtues li {
  counter-increment: virtue;
  border-top: 1px solid var(--rule);
  padding: 0.8rem 0 0 2.6rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.landing__virtues li::before {
  content: counter(virtue, upper-roman) '.';
  font-family: var(--font-label);
  position: absolute;
  left: 0;
  top: 0.75rem;
  color: var(--accent);
}

.landing__virtues strong { font-size: 1.08rem; }

.landing__virtues span {
  color: var(--ink-soft);
  font-size: 0.98rem;
  font-style: italic;
}


.landing__monthly {
  text-align: center;
  border-bottom: none;
}


/* ---------------------------------------------------------------------
   38. PHOTO SLOTS (master-editable photos on the landing page)
   A framed photo with a 4:3 window. When the master is logged in,
   landing.js drops a small ✎ button in the corner.
   --------------------------------------------------------------------- */
.photo-slot {
  margin: 0;
  position: relative;
}

.photo-slot__frame {
  border: 1px solid var(--rule);
  background: var(--paper-tint);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--paper-edge);
}


.photo-slot__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.photo-slot__edit {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2.1rem;
  height: 2.1rem;
  border: none;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
}

.photo-slot__edit:hover { background: var(--accent); }


/* ---------------------------------------------------------------------
   39. LOGIN TABS (login.html — member code vs chapter password)
   --------------------------------------------------------------------- */
.tabs {
  display: flex;
  border: 1px solid var(--rule);
  margin: 1.25rem 0;
}

.tabs__tab {
  flex: 1;
  background: transparent;
  border: none;
  border-right: 1px solid var(--rule);
  padding: 0.75rem 1rem;
  font-family: var(--font-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.tabs__tab:last-child { border-right: none; }


.form__hint {
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: -0.3rem 0 0.6rem;
}


/* ---------------------------------------------------------------------
   40. TOPBAR BRAND + CHAPTER BADGE (new roles, new home link)
   --------------------------------------------------------------------- */
/* Removed in v3.0: the topbar brand link and chapter badge no longer exist. */


/* ---------------------------------------------------------------------
   41. ADMIN ADDITIONS (member codes)
   --------------------------------------------------------------------- */
.admin__bulk-result {
  border: 2px solid var(--accent);
  background: var(--paper-tint);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.admin__bulk-result table { margin: 0.75rem 0 1rem; }


/* ---------------------------------------------------------------------
   42. LANDING RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 860px) {
  .landing__hero,
  .landing__two-col,
  .landing__two-col--reverse {
    grid-template-columns: 1fr;
  }


  .landing__section--tint { padding: 1.75rem 1.25rem; }
}


/* ---------------------------------------------------------------------
   43. DARK THEME — the jurisdiction's own colors
   The newspaper cream was DeMolay Monthly's identity; the institutional
   pages (landing, login, profile, support, admin) now wear the colors
   of the DeMolay emblem: black, gold, red.

   HOW IT WORKS: the whole design system reads CSS variables. In v1.1 a
   class="theme-dark" on <body> swapped their values; since v1.2 the dark
   values ARE the defaults (section 1), and what remains below are the
   manual touch-ups where a flipped value wasn't enough.
   --------------------------------------------------------------------- */
:root {
  /* The emblem gold + red, available everywhere (both themes). */
  --gold:      #d9a826;
  --gold-soft: #e8bb45;
  --red:       #a32222;
  --red-soft:  #c52f2f;
}

/* (The old .theme-dark token block is gone: dark IS the site now, so
   the single source of truth for colors is :root in section 1. The
   vestigial .theme-dark class was removed from every <body> in v2.6.) */

::selection { background: var(--gold); color: #14110c; }

/* Labels and kickers go gold on dark — the emblem's metalwork. */

/* Primary buttons go gold; danger red gets bright enough to read. */
.btn--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #14110c;
}
.btn--primary:hover { background: var(--gold-soft); }

.btn--danger {
  color: #e05b5b;
  border-color: #e05b5b;
  background: transparent;
}

/* Photo frames: dark plate, deep shadow. */
.photo-slot__frame {
  background: var(--paper-tint);
  border-color: var(--rule);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.55);
}

/* Form fields need explicit dark treatment (inputs keep their own
   UA background otherwise). */
input,
textarea,
select {
  background: var(--paper-tint);
  color: var(--ink);
  border-color: var(--rule);
}

.modal { background: var(--paper-tint); }


/* ---------------------------------------------------------------------
   44. CARD NAV
   One compact floating bar on every page (replaces the old cluttered
   topbar), modeled on the "Card Nav" pattern from React Bits — rebuilt
   here in plain CSS + JS, no React needed.

   Layout:  [≡ burger]   DEMOLAY ROMÂNIA   [Monthly] [Profil] [Login]
   Clicking the burger expands the bar downward into three link cards.
   auth.js renders the whole thing into <div id="dm-nav"> and decides
   which buttons exist based on who is logged in.
   --------------------------------------------------------------------- */
.cardnav-wrap {
  position: sticky;
  top: 0.8rem;
  z-index: 300;
  padding: 0.8rem 1.25rem 0;
}

.cardnav {
  max-width: 980px;
  margin: 0 auto;
  background: #1b2236;
  border: 1px solid #2f3850;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.cardnav__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
}

/* Hamburger → X. Two bars that rotate when .cardnav--open. */
.cardnav__burger {
  justify-self: start;
  width: 40px;
  height: 40px;
  border: 1px solid #41496a;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.cardnav__burger:hover { border-color: var(--gold); }
.cardnav__burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #f2eee3;
  transition: transform 0.3s ease;
}
.cardnav--open .cardnav__burger span:first-child  { transform: translateY(4px) rotate(45deg); }
.cardnav--open .cardnav__burger span:last-child   { transform: translateY(-4px) rotate(-45deg); }


.cardnav__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.cn-btn {
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.cn-btn--gold  { background: var(--gold); color: #14110c; }
.cn-btn--gold:hover { background: var(--gold-soft); }
.cn-btn--ghost { background: transparent; color: #e8e2d2; border-color: #41496a; }
.cn-btn--ghost:hover { border-color: var(--gold); color: #fff; }
.cn-btn--red   { background: var(--red); color: #fff; }
.cn-btn--red:hover { background: var(--red-soft); }

/* The expanding panel. max-height animates because height can't. */
.cardnav__panel {
  max-height: 0;
  opacity: 0;
  transition: max-height 0.45s ease, opacity 0.3s ease;
}
.cardnav--open .cardnav__panel { max-height: 420px; opacity: 1; }

.cardnav__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  padding: 0.2rem 0.8rem 0.8rem;
}

.cn-card {
  border-radius: 10px;
  padding: 0.85rem 1rem 1rem;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  border: 1px solid #2f3850;
}

.cn-card__label {
  font-family: var(--font-label);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}

.cn-card__links {
  margin-top: auto;
  padding-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cn-card__link {
  color: #f2eee3;
  text-decoration: none;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  transition: transform 0.15s ease, color 0.15s ease;
}
.cn-card__link::before { content: '↗'; font-size: 0.8rem; color: var(--gold); }
.cn-card__link:hover { color: var(--gold-soft); transform: translateX(4px); }

@media (max-width: 760px) {
  /* On phones the right-side buttons move into the cards. */
  .cardnav__actions .cn-btn--ghost { display: none; }
  .cardnav__cards { grid-template-columns: 1fr; }
  .cn-card { min-height: 0; }
}


/* ---------------------------------------------------------------------
   45. INTRO ANIMATION (landing page only)
   The logo slides up from the bottom, holds a beat, then the camera
   dives through the counter (the hole) of the "o" in DeMolay. Built
   from three CSS animations; landing.js adds the classes in sequence
   and removes the overlay at the end. Plays once per browser session;
   skipped entirely for visitors who prefer reduced motion.
   --------------------------------------------------------------------- */
.dm-intro {
  position: fixed;
  inset: 0;
  background: #10131e;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer; /* click anywhere to skip */
}

.dm-intro__logo {
  width: min(72vw, 560px);
  height: auto;
  opacity: 0;
  transform: translateY(60vh);
  /* The dive aims at the counter of the "O" in "DEMOLAY" — these
     percentages are where that hole sits inside the official logo SVG. */
  transform-origin: 56% 52%;
  will-change: transform, opacity;
}

.dm-intro--slide .dm-intro__logo {
  animation: dmIntroSlide 1.15s cubic-bezier(0.16, 0.8, 0.3, 1) forwards;
}

.dm-intro--zoom .dm-intro__logo {
  animation: dmIntroZoom 1.05s cubic-bezier(0.7, 0, 0.85, 0.4) forwards;
}

.dm-intro--fade { animation: dmIntroFade 0.45s ease forwards; }

@keyframes dmIntroSlide {
  0%   { opacity: 0; transform: translateY(60vh); }
  40%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes dmIntroZoom {
  0%   { opacity: 1; transform: scale(1); }
  85%  { opacity: 1; }
  100% { opacity: 0; transform: scale(44); }
}

@keyframes dmIntroFade { to { opacity: 0; } }

/* While the intro runs, the page behind it must not scroll. */
html.dm-intro-active { overflow: hidden; }


/* ---------------------------------------------------------------------
   46. LANDING v1.1 — parents box + contact section
   --------------------------------------------------------------------- */
.landing__parents {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--gold);
  background: var(--paper-tint);
  padding: 1.1rem 1.4rem;
  margin-top: 1.5rem;
}
.landing__parents h3 {
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.5rem;
}
.landing__parents p { margin: 0 0 0.6rem; color: var(--ink-soft); }
.landing__parents p:last-child { margin-bottom: 0; }

.landing__contact {
  text-align: center;
  border-bottom: none;
  padding-bottom: 3.5rem;
}
.landing__contact .landing__intro { margin: 0 auto 1rem; }
.landing__contact-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}
.landing__contact-note {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.98rem;
  margin-top: 1rem;
}


/* ---------------------------------------------------------------------
   47. PROFILE PAGE
   --------------------------------------------------------------------- */
.profile-rows { margin: 1.25rem 0; }
.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--paper-edge);
}
.profile-row dt {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
.profile-row dd { margin: 0; text-align: right; }

.role-pill {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
}
.role-pill--admin   { border-color: var(--gold); color: var(--gold); }


/* ---------------------------------------------------------------------
   48. SMALL FIXES
   --------------------------------------------------------------------- */
/* Multi-line messages in dialogs (e.g. the member-code dialog) keep
   their line breaks instead of collapsing into one long sentence. */
.modal__body { white-space: pre-line; }


/* ---------------------------------------------------------------------
   49. v1.2 — NEWSPAPER RETIREMENT
   The dark theme is now global (tokens in section 1), so the loud
   newspaper props get retired here: blackletter is gone (--font-mast
   became Cinzel, and since v2.12 the one body font), highlights get
   readable text, and the masthead is resized.
   --------------------------------------------------------------------- */
.masthead__title {
  font-weight: 700;
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  letter-spacing: 0.04em;
}


/* Text highlights have a fixed light-yellow background — the dark
   theme's light ink would vanish on it, so pin the text color dark. */

/* "From the archive" banner used a hardcoded cream. */

/* The archive: wood-and-manila skeuomorphism → dark professional cards. */
.drawer {
  background: var(--paper-tint);
  border: 1px solid var(--rule);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

.drawer__label {
  background: #10131e;
  color: var(--ink);
  border-color: #14110c;
}

.drawer__pull {
  background: linear-gradient(180deg, #454d68 0%, #262d40 100%);
  border-color: #14110c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.folder {
  background: #222a3e;
  border-color: #3a4258;
}

.folder__tab {
  background: var(--gold);
  border-color: var(--gold-soft);
  color: #14110c;
}

/* The small × delete/cancel buttons used a red too dark to see. */
.folder__delete,
.schedule__cancel,
.event__cancel { color: #e05b5b; }

.folder__delete:hover,
.schedule__cancel:hover,
.schedule__cancel:focus-visible,
.event__cancel:hover,
.event__cancel:focus-visible {
  background: #e05b5b;
  color: #14110c;
  border-color: #e05b5b;
}


/* ---------------------------------------------------------------------
   50. READABILITY PASS
   Bigger, brighter, no italics-at-small-sizes. The --ink-soft token was
   also brightened in section 1 — these are the size/spacing half.
   --------------------------------------------------------------------- */
.landing p,
.landing li { font-size: 1.07rem; line-height: 1.65; }


.landing__virtues span { font-style: normal; font-size: 1rem; }

.landing__contact-note { font-style: normal; }

.form__hint { font-style: normal; }


/* ---------------------------------------------------------------------
   51. FUSED PANELS (landing)
   Text and its neighbouring photo live in ONE box: the text half is
   padded, the photo half runs flush to the box edge, and a single
   border wraps both.
   --------------------------------------------------------------------- */
.landing__hero {
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  align-items: stretch;
  padding: 0;
  margin-top: 2rem;
  border: 1px solid var(--paper-edge);
  border-radius: 14px;
  background: var(--paper-tint);
  overflow: hidden;
}

.landing__hero-text {
  padding: 2.75rem 2.5rem;
  align-self: center;
}

.landing__two-col {
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--paper-edge);
  border-radius: 14px;
  background: var(--paper-tint);
  overflow: hidden;
}

.landing__two-col > div { padding: 2.5rem; }

/* Inside a fused panel the photo loses its own frame — the panel IS
   the frame — and stretches to fill its half completely. */
.landing__hero .photo-slot,
.landing__two-col .photo-slot { display: flex; }

.landing__hero .photo-slot__frame,
.landing__two-col .photo-slot__frame {
  border: 0;
  box-shadow: none;
  border-radius: 0;
  width: 100%;
  height: 100%;
  min-height: 340px;
  aspect-ratio: auto;
  flex: 1;
}

/* The parents box sits ON a panel now — go a step darker to separate. */
.landing__parents { background: rgba(0, 0, 0, 0.35); }

/* Rounded corners for the already-boxed sections too. */
.landing__section--tint { border-radius: 14px; }

@media (max-width: 860px) {
  .landing__hero .photo-slot__frame,
  .landing__two-col .photo-slot__frame { min-height: 240px; }
  .landing__hero-text,
  .landing__two-col > div { padding: 1.75rem 1.4rem; }
}


/* ---------------------------------------------------------------------
   52. MASTHEAD LOGO (landing page)
   The official wordmark replaces the typeset title on the homepage.
   --------------------------------------------------------------------- */
.masthead__logo { margin: 1rem 0 1.1rem; }

.masthead__logo img {
  width: min(440px, 78vw);
  height: auto;
  display: block;
  margin: 0 auto;
}


/* ---------------------------------------------------------------------
   53. BLUR-TEXT REVEAL (React Bits style)
   landing.js tags text elements with .blur-reveal and a per-element
   --reveal-delay, then flips body.reveal-go — everything sharpens out
   of a blur, staggered top to bottom. The class is ONLY ever added by
   JS, so without JS nothing is hidden.
   --------------------------------------------------------------------- */
.blur-reveal {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(14px);
}

body.reveal-go .blur-reveal {
  opacity: 1;
  filter: blur(0);
  transform: none;
  transition:
    opacity 0.7s ease,
    filter 0.7s ease,
    transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
  .blur-reveal { opacity: 1; filter: none; transform: none; }
}


/* ---------------------------------------------------------------------
   54. TRICOLOR — the flag, worn quietly
   The three nav cards wear the flag, in order: red, yellow, blue.
   --------------------------------------------------------------------- */

.cn-card--a { background: #251314; border-color: #43201f; }
.cn-card--a .cn-card__label,
.cn-card--a .cn-card__link::before { color: #e25b5b; }

.cn-card--b { background: #272110; border-color: #463a14; }
.cn-card--b .cn-card__label,
.cn-card--b .cn-card__link::before { color: #fcd116; }

.cn-card--c { background: #121a2c; border-color: #233457; }
.cn-card--c .cn-card__label,
.cn-card--c .cn-card__link::before { color: #6f95e8; }


/* ---------------------------------------------------------------------
   55. RED ACCENTS — here and there, not everywhere
   (v1.3: the kicker dashes and heading underline bars were removed at
   the owner's request — they read as misaligned clutter. The red now
   lives only where it's structural: card-title underlines, the footer
   rule, and the danger buttons.)
   --------------------------------------------------------------------- */
/* The footer gets a thin red rule on top. */


/* ---------------------------------------------------------------------
   56. v1.3 FIXES & FEATURES
   --------------------------------------------------------------------- */

/* THE LOGIN-PAGE BUG, fixed for the whole site: the browser's default
   for the hidden attribute is display:none, but ANY author rule that
   sets display (like `.form { display:flex }`) silently wins over it.
   That's why both login forms were visible at once, stacked into each
   other. This rule makes `hidden` actually mean hidden, always. */
[hidden] { display: none !important; }

/* Breathing room between a form's fields and its buttons. */
.form__actions { margin-top: 0.5rem; }

/* Virtues: flexbox instead of a grid, so the last row (3 of 7) sits
   CENTERED instead of hugging the left edge. */
.landing__virtues {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.1rem 2rem;
}

.landing__virtues li { flex: 0 1 250px; }

/* Each virtue is now a quiet link to its own page. */
.landing__virtues a {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}


/* The nav's left cluster: burger + the DeMolay Monthly button. */
.cardnav__left {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* Patch notes — a quiet version button in the footer, master-only
   (auth.js injects it only for the admin session). */
.colophon__version {
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  margin-top: 0.9rem;
  cursor: pointer;
}
.colophon__version:hover { color: var(--gold); border-color: var(--gold); }

/* The patch-notes list inside the modal. */
.patchnotes {
  max-height: 55vh;
  overflow-y: auto;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.patchnotes li {
  border-top: 1px solid var(--paper-edge);
  padding: 0.8rem 0.2rem;
}

.patchnotes__version {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-right: 0.6rem;
}

.patchnotes p { margin: 0.35rem 0 0; color: var(--ink-soft); }

/* The single-virtue page (virtute.html). */
.virtue-page { max-width: 720px; margin: 0 auto; padding: 2.5rem 1.25rem 3.5rem; }


.virtue-page__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}


/* ---------------------------------------------------------------------
   57. v1.4 — TRUE CENTERING for the masthead rules
   The old layout was flexbox space-between, which only LOOKS centered
   when the left and right texts happen to be the same width. With
   "BULETINUL JURISDICȚIEI … DOAR PENTRU MEMBRI" they aren't, so the
   middle text ("11 IUNIE 2026", "LEADERSHIP") drifted. A 1fr|auto|1fr
   grid pins the middle cell to the page's actual center.
   --------------------------------------------------------------------- */
/* Removed in v3.0: the masthead rule row (.masthead__rule) no longer exists. */


/* ---------------------------------------------------------------------
   58. @TAGS + MINI-PROFILES
   --------------------------------------------------------------------- */
.user-tag {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}
.user-tag:hover { text-decoration: underline; color: var(--gold-soft); }

/* The mini-profile card on user.html. */
.user-card { text-align: center; }
.user-card .role-pill { margin-top: 0.25rem; }
.user-card__handle {
  color: var(--gold);
  font-weight: 600;
  margin: 0.2rem 0 0.8rem;
}


/* ---------------------------------------------------------------------
   59. EDITABLE TEXT CHIPS (master-only, injected by editable.js)
   --------------------------------------------------------------------- */
.edit-text-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-label);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  border: 1px dashed var(--rule);
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  margin: 0.2rem 0 0.8rem;
  cursor: pointer;
  opacity: 0.65;
}
.edit-text-chip:hover { opacity: 1; border-color: var(--gold); }


/* ---------------------------------------------------------------------
   60. LANDING "READ MORE" CTAs (the explore-the-site links)
   --------------------------------------------------------------------- */
.landing__more {
  margin-top: 1.25rem;
}
.landing__more a {
  font-family: var(--font-label);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
}
.landing__more a:hover { color: var(--gold-soft); text-decoration: underline; }


/* ---------------------------------------------------------------------
   61. v1.5 — PRESENTATION POLISH
   --------------------------------------------------------------------- */

/* Keyboard users get a clear gold focus ring everywhere. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[contenteditable]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Anchor jumps (#virtuti, #contact) glide instead of teleporting. */
html { scroll-behavior: smooth; }

/* Footer links show their gold on hover. */
.colophon a:hover { color: var(--gold); }

/* ------- The virtue page, dressed up ------- */
.virtue-page__panel {
  background: var(--paper-tint);
  border: 1px solid var(--paper-edge);
  border-radius: 14px;
  padding: 2.25rem 2.25rem 2rem;
}

.virtue-page__numeral {
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--gold);
  margin: 0 0 0.6rem;
}

.virtue-page__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 0.4rem;
}

.virtue-page__motto {
  font-size: 1.18rem;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--paper-edge);
}

.virtue-page__body p {
  font-size: 1.07rem;
  line-height: 1.7;
}

/* The takeaway callout — same family as the "Pentru părinți" box. */
.virtue-page__practice {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--gold);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.3rem;
  margin-top: 1.6rem;
}

.virtue-page__practice h3 {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.4rem;
}

.virtue-page__practice p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.virtue-page__nav .btn { border-radius: 8px; }


/* ---------------------------------------------------------------------
   62. v1.6 — LIVE TAG HIGHLIGHT in the article editor
   While writing, a valid @username lights up the moment it's complete,
   so the author KNOWS the tag will work before publishing. Added by
   editor.js around the matched text; stripped again before the article
   is saved, so stored content stays plain.
   --------------------------------------------------------------------- */
.tag-live {
  color: var(--gold);
  font-weight: 600;
  background: rgba(217, 168, 38, 0.14);
  border-radius: 4px;
  padding: 0 0.12em;
  box-shadow: 0 0 0 1px rgba(217, 168, 38, 0.35) inset;
}


/* ---------------------------------------------------------------------
   63. v1.7 — virtue definition opener + closing line
   --------------------------------------------------------------------- */
.virtue-page__definition {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--ink);
  font-style: italic;
}
/* (.virtue-page__closing lived here until v2.11, when the shared
   closing sentence was removed from the virtue pages.) */


/* ---------------------------------------------------------------------
   64. v1.7 — HERO THREE-LINE STRUCTURE (style guide homepage hero)
   --------------------------------------------------------------------- */
.landing__hero-lines {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.1;
}
.landing__hero-lines span { display: block; }
.landing__hero-lines span:nth-child(2) { color: var(--ink-soft); }
.landing__hero-lines span:nth-child(3) { color: var(--gold); }


/* ---------------------------------------------------------------------
   65. v1.7 — STATISTICS BANNER (number + ALL CAPS description)
   --------------------------------------------------------------------- */
.stats-banner {
  max-width: var(--max-width);
  margin: 2.25rem auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.stat-block {
  border: 1px solid var(--paper-edge);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  background: var(--paper-tint);
  padding: 1.5rem 1.6rem;
}
.stat-block__num {
  display: block;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  color: var(--gold);
  line-height: 1;
}
.stat-block__text {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-label);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--ink-soft);
}
@media (max-width: 700px) {
  .stats-banner { grid-template-columns: 1fr; }
}


/* ---------------------------------------------------------------------
   66. v1.7 — "Un DeMolay:" CODE BLOCK (recurring values list)
   --------------------------------------------------------------------- */
/* Removed in v2.13 with the "Codul DeMolay" section of descopera.html,
   at Matei's request. The number stays so the sections keep their order. */


/* ---------------------------------------------------------------------
   67. v1.7 — MUTED BLURRED BACKGROUND (haikei blobs, toned down)
   A fixed, heavily-blurred scene sits behind everything. Because it's
   blurred and low-contrast, it reads as soft warm/cool glows in the
   corners over the slate-blue base, never competing with the content.
   Cards and photo frames keep their opaque --paper-tint, so text
   surfaces stay solid dark blue exactly as before.
   --------------------------------------------------------------------- */
body::before {
  content: '';
  position: fixed;
  inset: -10vmax;                 /* overscan so the blur has no hard edge */
  z-index: -1;
  background: var(--paper) url("bg.svg") center / cover no-repeat;
  filter: blur(70px) saturate(0.85);
  opacity: 0.5;
  pointer-events: none;
}


/* ---------------------------------------------------------------------
   68. v1.8 — CHAPTER RANKS + BYLAWS
   --------------------------------------------------------------------- */
.rank-pill {
  display: inline-block;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--gold);
  color: #14110c;
}
.rank-until {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.25rem;
}
.muted { color: var(--ink-soft); }

/* Bylaws editor */
.bylaws {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.2rem;
  margin-top: 0.5rem;
}
.bylaws__field { display: flex; flex-direction: column; gap: 0.35rem; }
.bylaws__input {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.bylaws__input input {
  width: 4.5rem;
  background: var(--paper-tint);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  font: inherit;
}


/* ---------------------------------------------------------------------
   69. v1.9 — RANK+CHAPTER BUBBLE (rank and chapter, together)
   --------------------------------------------------------------------- */
.rank-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--paper-tint);
  border: 1px solid var(--paper-edge);
  border-radius: 999px;
  padding: 0.25rem 0.7rem 0.25rem 0.3rem;
  font-size: 0.95rem;
}
.rank-bubble__rank {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--gold);
  color: #14110c;
}
.rank-bubble__chapter { color: var(--ink); padding-right: 0.35rem; }
/* When there's no rank chip, give the chapter a little left padding. */
.rank-bubble__chapter:first-child { padding-left: 0.55rem; }


/* ---------------------------------------------------------------------
   70. v1.9 — ROLE TAG chip (@MC / @PC / @CS in article text)
   --------------------------------------------------------------------- */
.role-tag {
  font-weight: 700;
  color: #14110c;
  background: var(--gold);
  border-radius: 5px;
  padding: 0 0.3em;
  font-size: 0.95em;
}


/* ---------------------------------------------------------------------
   71. v1.9 — NAV NOTIFICATION BELL
   --------------------------------------------------------------------- */
.cn-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid #3a3f4e;
  text-decoration: none;
}
.cn-bell:hover { border-color: var(--gold); }
.cn-bell__icon { font-size: 1rem; filter: grayscale(0.2); }
.cn-bell__count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* ---------------------------------------------------------------------
   72. v1.9 — NOTIFICATIONS LIST
   --------------------------------------------------------------------- */
.notif { list-style: none; margin: 0; padding: 0; }
.notif__item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--paper-edge);
  border-radius: 10px;
  margin-bottom: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper-tint);
}
a.notif__item:hover { border-color: var(--gold); }
.notif__item--unread { border-left: 4px solid var(--gold); }
.notif__badge {
  flex: none;
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
}
.notif__badge--tag  { color: var(--gold); border-color: var(--gold); }
.notif__badge--role { color: var(--gold); border-color: var(--gold); }
.notif__badge--post { color: #6f95e8; border-color: #6f95e8; }
.notif__text { flex: 1; }
.notif__time { flex: none; color: var(--ink-soft); font-size: 0.82rem; }


/* =====================================================================
   73. v2.2 — UI REWORK
   Sheds the last newspaper mannerisms and warms the site up: a modern
   masthead eyebrow (no boxed rules), softer warm dividers, the seven
   virtues as glowing cards, a scroll parallax on the landing, a legible
   editor toolbar, and a touch of the background's red/gold warmth.
   Appended last, so it wins over the older rules on purpose.
   ===================================================================== */

/* ---- 73.1 tokens: per-virtue glow colors + warm accents ---- */
:root {
  --warm-red:  #e0484a;
  --warm-gold: #f0c14b;

  --v-iubirea:      #e0484a; /* Iubirea Filială — red            */
  --v-veneratia:    #a274f0; /* Venerația — purple               */
  --v-curtoazia:    #3f6fe8; /* Curtoazia — royal blue (≠ bg)    */
  --v-camaraderia:  #35c26a; /* Camaraderia — green              */
  --v-fidelitatea:  #86c5ff; /* Fidelitatea — baby blue          */
  --v-curatenia:    #ffffff; /* Curățenia — white                */
  --v-patriotismul: #f2c94c; /* Patriotismul — gold              */
}

/* ---- 73.2 masthead: a quiet professional eyebrow, no print rules ---- */
.masthead {
  border-bottom: none;
  padding-bottom: 0.85rem;
}
/* One warm hairline replaces the old 4px double newspaper rule. */
.masthead::after {
  content: "";
  display: block;
  height: 1px;
  width: min(600px, 84%);
  margin: 1.55rem auto 0;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--warm-red) 55%, transparent),
    color-mix(in srgb, var(--warm-gold) 62%, transparent),
    transparent);
}
.masthead--small { padding-bottom: 0.6rem; }
.masthead--small::after { margin-top: 1.05rem; }

/* ---- 73.3 softer dividers where "lines" still read as print ---- */
/* Footer: the solid red bar becomes a warm gradient hairline. */
.colophon { border-top: none; position: relative; }
.colophon::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--warm-red) 70%, transparent),
    color-mix(in srgb, var(--warm-gold) 70%, transparent),
    transparent);
}

/* ---- 73.4 the seven virtues, now glowing cards (landing) ---- */
.landing__virtues { gap: 1.3rem; }
.landing__virtues li {
  border-top: none;
  padding: 0;
  position: relative;
  --vg: var(--gold);              /* default; per-virtue value set below */
}
/* the circular glow that blooms behind the card on hover */
.landing__virtues li::after {
  content: "";
  position: absolute;
  inset: -26%;
  border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--vg) 46%, transparent),
    transparent 62%);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.38s ease;
}
.landing__virtues li:hover::after,
.landing__virtues li:focus-within::after { opacity: 1; }
/* the roman numeral, tucked inside the card and tinted per virtue */
.landing__virtues li::before {
  top: 1.15rem;
  left: 1.25rem;
  color: var(--vg);
  z-index: 2;
}
.landing__virtues a {
  position: relative;
  z-index: 1;
  padding: 1.2rem 1.3rem 1.35rem 3.15rem;
  border-radius: 16px;
  background: var(--paper-tint);
  border: 1px solid var(--paper-edge);
  transition: transform 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease;
}
.landing__virtues a:hover,
.landing__virtues a:focus-visible {
  transform: translateY(-4px);
  border-color: var(--vg);
  box-shadow:
    0 0 0 1px var(--vg),
    0 12px 34px -8px color-mix(in srgb, var(--vg) 60%, transparent);
}
.landing__virtues a:hover strong,
.landing__virtues a:focus-visible strong { color: var(--vg); }

.landing__virtues li[data-virtue="iubirea-filiala"] { --vg: var(--v-iubirea); }
.landing__virtues li[data-virtue="veneratia"]       { --vg: var(--v-veneratia); }
.landing__virtues li[data-virtue="curtoazia"]       { --vg: var(--v-curtoazia); }
.landing__virtues li[data-virtue="camaraderia"]     { --vg: var(--v-camaraderia); }
.landing__virtues li[data-virtue="fidelitatea"]     { --vg: var(--v-fidelitatea); }
.landing__virtues li[data-virtue="curatenia"]       { --vg: var(--v-curatenia); }
.landing__virtues li[data-virtue="patriotismul"]    { --vg: var(--v-patriotismul); }

/* ---- 73.5 the single virtue page wears its color ---- */
.virtue-page__panel {
  border-color: color-mix(in srgb, var(--vg, var(--gold)) 45%, var(--paper-edge));
  box-shadow: 0 0 70px -22px color-mix(in srgb, var(--vg, var(--gold)) 60%, transparent);
}
.virtue-page__numeral { color: var(--vg, var(--gold)); }
.virtue-page__motto {
  border-bottom-color: color-mix(in srgb, var(--vg, var(--gold)) 34%, var(--paper-edge));
}
.virtue-page__practice { border-left-color: var(--vg, var(--gold)); }
.virtue-page__practice h3 { color: var(--vg, var(--gold)); }
.virtue-page__nav .btn--primary {
  background: var(--vg, var(--gold));
  border-color: var(--vg, var(--gold));
  color: #14110c;
}

/* ---- 73.6 editor toolbar: buttons you can actually see ---- */
.editor__toolbar {
  background: var(--paper-tint);
  border-bottom: 1px solid var(--paper-edge);
  gap: 0.35rem;
  padding: 0.6rem;
}
.editor__toolbar button {
  background: #2b3450;
  color: var(--ink);
  border: 1px solid #46527a;
  border-radius: 8px;
  min-width: 2.3rem;
  height: 2.15rem;
  font-size: 1.02rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.08s ease;
}
.editor__toolbar button:hover,
.editor__toolbar button:focus-visible {
  background: var(--gold);
  color: #14110c;
  border-color: var(--gold);
}
.editor__toolbar button:active { transform: translateY(1px); }
.editor__toolbar button strong { font-weight: 800; }
.editor__toolbar button mark {
  background: #ffe98c;
  color: #1f1a14;
  padding: 0 0.28em;
  border-radius: 3px;
  font-weight: 700;
}

/* ---- 73.7 landing parallax gallery (parallax.js drives the motion) ---- */
.parallax {
  max-width: var(--max-width);
  margin: 2.75rem auto 3rem;
  padding: 0 1.25rem;
}
.parallax__intro { text-align: center; margin-bottom: 1.5rem; }
.parallax__stage {
  position: relative;
  height: clamp(430px, 72vh, 720px);
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--paper-edge);
  background: rgba(0, 0, 0, 0.30);
  display: flex;
  gap: 14px;
  padding: 14px;
}
.parallax__col { flex: 1; position: relative; min-width: 0; }
.parallax__col-inner {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  will-change: transform;
}
.parallax__tile {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  flex: none;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--warm-red) 26%, var(--paper-tint)),
      color-mix(in srgb, var(--warm-gold) 22%, var(--paper-tint)));
  position: relative;
}
.parallax__tile img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
/* graceful placeholder when a photo file isn't there yet */
.parallax__tile--empty::after {
  content: "FOTOGRAFIE";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-label);
  font-size: 0.72rem; letter-spacing: 0.24em;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
}
/* soft fade at the top/bottom edges so columns bleed in nicely */
.parallax__stage::before,
.parallax__stage::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 64px; z-index: 3; pointer-events: none;
}
.parallax__stage::before { top: 0;    background: linear-gradient(to bottom, var(--paper), transparent); }
.parallax__stage::after  { bottom: 0; background: linear-gradient(to top,    var(--paper), transparent); }

@media (max-width: 720px) {
  .parallax__col:nth-child(3) { display: none; } /* two columns on phones */
}

/* ---- 73.8 a friendlier, warmer finish ---- */
/* A soft warm bloom behind the hero, drawn from the background's tones. */
.landing__hero { position: relative; }
.landing__hero::before {
  content: "";
  position: absolute;
  inset: -8% -12% 0 -12%;
  z-index: -1;
  background: radial-gradient(60% 60% at 22% 30%,
    color-mix(in srgb, var(--warm-red) 16%, transparent), transparent 70%),
    radial-gradient(55% 55% at 82% 24%,
    color-mix(in srgb, var(--warm-gold) 15%, transparent), transparent 70%);
  pointer-events: none;
}
/* Kickers pick up a hair of warmth over the flat gold. */
.landing__kicker { color: var(--warm-gold); }

/* ---- 73.9 card surfaces: drop the harsh white frame + boxed label ---- */
/* The bright 1px --ink frame and the top/bottom-ruled label were the last
   loud print holdovers on the login / support / editor / admin cards. */
.card {
  border-color: var(--paper-edge);
  border-radius: 16px;
}
.card__label {
  border-top: none;
  border-bottom: none;
  padding: 0;
  color: var(--warm-gold);
  margin-bottom: 0.8rem;
}
.card__lede { font-style: normal; }


/* =====================================================================
   74. v2.3 — REFINEMENT + SOUL
   Real photos in the parallax, the masthead eyebrow removed, the virtue
   glow fixed so it never floats over a neighbour, centered nav/login
   buttons, a hand-drawn minimal bell, and a warmer, friendlier finish.
   ===================================================================== */

/* ---- 74.1 masthead: drop the eyebrow label strips entirely ---- */
/* The three-label rows read as leftover chrome now; the logo/title plus
   the warm hairline carry the header on their own. Back-navigation lives
   in the card nav. */
.masthead { padding-top: 1.6rem; }
.masthead--small { padding-top: 1.25rem; }

/* ---- 74.2 virtue glow: keep it under its OWN card, never floating ----
   Each tile gets its own stacking context; the hovered one rises above
   its neighbours so the bloom reads as "around this card", not a stray
   layer drifting over the row above. */
.landing__virtues li { z-index: 1; }
.landing__virtues li:hover,
.landing__virtues li:focus-within { z-index: 3; }
.landing__virtues li::after {
  inset: -18%;                 /* hug the card a little tighter */
}

/* ---- 74.3 centered buttons (virtue nav + login) ---- */
.virtue-page__nav { justify-content: center; }
#member-form .form__actions,
#chapter-form .form__actions { justify-content: center; }

/* ---- 74.4 parallax: let the real photos keep their own shape ----
   A genuine "memories wall" — portraits stay tall, group shots stay
   wide — instead of everything cropped to one rectangle. */
.parallax__tile { aspect-ratio: auto; background: var(--paper-tint); }
.parallax__tile img { height: auto; }
.parallax__tile--empty {
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--warm-red) 26%, var(--paper-tint)),
      color-mix(in srgb, var(--warm-gold) 22%, var(--paper-tint)));
}

/* ---- 74.5 a quieter parallax heading ---- */
.parallax__intro .landing__heading {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  color: var(--ink);
}

/* ---- 74.6 minimal bell (SVG drawn in auth.js) ---- */
.cn-bell__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: none;
}
.cn-bell__icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--ink-soft);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.18s ease, transform 0.18s ease;
}
.cn-bell:hover .cn-bell__icon svg {
  stroke: var(--gold);
  transform: rotate(-8deg);
}

/* ---- 74.7 warmth + soul: gentle life on the things you touch ---- */
.stat-block {
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}
.stat-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -16px color-mix(in srgb, var(--warm-gold) 55%, transparent);
}
/* The "Pentru părinți" box gets a warm left edge — a reassuring hand. */
.landing__parents {
  border-left: 3px solid color-mix(in srgb, var(--warm-red) 60%, transparent);
  border-radius: 0 12px 12px 0;
}
/* Buttons ease instead of snapping. */
.btn { transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.12s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
/* Section headings carry a touch more warmth in their kicker. */
.landing__section .landing__kicker { color: var(--warm-gold); }

/* ---- 74.8 questions (FAQ) page ---- */
.faq h3 {
  margin: 1.6rem 0 0.4rem;
  color: var(--ink);
  font-size: 1.12rem;
}
.faq h3:first-of-type { margin-top: 0.6rem; }
.faq p { color: var(--ink-soft); margin: 0; }
.faq__cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.2rem;
}

/* ---- 74.9 a little soul: links that answer when you reach for them ----
   The "read more" trails and footer links grow an underline from the side
   you're moving toward, instead of just sitting there. */
.landing__more a,
.colophon a {
  position: relative;
  text-decoration: none;
}
.landing__more a::after,
.colophon a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.landing__more a:hover::after,
.colophon a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* The hero photo frame warms and lifts a hair when you hover the hero. */
.landing__hero .photo-slot__frame {
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}
.landing__hero:hover .photo-slot__frame {
  box-shadow: 0 18px 44px -22px color-mix(in srgb, var(--warm-gold) 55%, transparent);
}


/* =====================================================================
   75. v2.4 — PRIMA IMPRESIE
   The landing page finishes what it starts. Empty photo slots become
   intentional (warm gradient, emblem watermark, the site's own motto
   as a caption) instead of dark boxes; the seven virtues stand at one
   height; the page ends strong with a miniature bulletin cover and a
   proper contact card; sections rise gently into view on scroll.
   ===================================================================== */


/* ---- 75.2 the seven virtues stand at one height ----
   Each li already stretches to its flex line; the anchor now fills its
   li completely, so a long name (Venerația...) no longer leaves its
   neighbours looking clipped. */
.landing__virtues a { flex: 1; }

/* ---- 75.3 DeMolay Monthly: the pitch beside a miniature cover ---- */
.landing__monthly { text-align: left; }
.landing__monthly-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--gap);
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
}
.landing__monthly-pitch .landing__intro { margin-left: 0; margin-right: 0; }

/* The cover: a bold masthead, gold hairlines, three suggested headline
   bars. All decoration — the real bulletin waits behind the login. */
.monthly-cover {
  justify-self: center;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: min(300px, 100%);
  aspect-ratio: 3 / 4;
  padding: 1.6rem 1.5rem 1.5rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--gold) 38%, var(--paper-edge));
  background:
    linear-gradient(165deg,
      var(--paper-tint),
      color-mix(in srgb, var(--warm-gold) 7%, var(--paper-tint)));
  text-decoration: none;
  transition: transform 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease;
}
.monthly-cover:hover,
.monthly-cover:focus-visible {
  transform: translateY(-5px) rotate(-0.5deg);
  border-color: var(--gold);
  box-shadow: 0 18px 44px -18px color-mix(in srgb, var(--warm-gold) 55%, transparent);
}
.monthly-cover__issue {
  font-family: var(--font-label);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
  text-align: center;
}
.monthly-cover__masthead {
  font-family: var(--font-mast);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.15;
  text-align: center;
  color: var(--ink);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
}
/* a suggested photo block, echoing the empty-slot gradient */
.monthly-cover__photo {
  flex: 1;
  border-radius: 8px;
  background:
    url("emblem.svg") center / 68% no-repeat,
    linear-gradient(150deg,
      color-mix(in srgb, var(--warm-red) 22%, var(--paper-tint)),
      color-mix(in srgb, var(--warm-gold) 16%, var(--paper-tint)));
  background-blend-mode: soft-light, normal;
}
.monthly-cover__lines {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.monthly-cover__lines span {
  height: 7px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink-soft) 32%, transparent);
}
.monthly-cover__lines span:first-child {
  width: 88%;
  background: color-mix(in srgb, var(--gold) 55%, transparent);
}
.monthly-cover__lines span:nth-child(2) { width: 72%; }
.monthly-cover__lines span:last-child  { width: 55%; }

@media (max-width: 860px) {
  .landing__monthly { text-align: center; }
  .landing__monthly-grid { grid-template-columns: 1fr; }
  .landing__monthly-pitch .landing__intro { margin-left: auto; margin-right: auto; }
}

/* ---- 75.4 the contact card: the page ends with an embrace ---- */
.landing__contact {
  max-width: 880px;
  margin: 2.75rem auto 3.5rem;
  padding: 2.6rem 2rem 2.4rem;
  border-radius: 18px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--paper-tint), var(--paper-tint)) padding-box,
    linear-gradient(135deg,
      color-mix(in srgb, var(--warm-red) 60%, var(--paper-edge)),
      color-mix(in srgb, var(--warm-gold) 65%, var(--paper-edge))) border-box;
}
.landing__contact .landing__intro { max-width: 40rem; }
.landing__contact-note { max-width: 34rem; margin-left: auto; margin-right: auto; }

/* ---- 75.5 scroll reveals (classes managed by landing.js) ---- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(8px);
}
.scroll-reveal--in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal { opacity: 1; transform: none; }
}


/* =====================================================================
   76. v2.5 — BULETINUL, ÎNGRIJIT
   The members' side catches up with the landing: a book-page reading
   experience, soft warm chrome instead of the last print borders, a
   time-of-day greeting, empty states with the emblem, virtue pages
   that breathe, and Cinzel served from our own folder so the brand
   survives an offline USB presentation.
   ===================================================================== */

/* ---- 76.1 (Cinzel used to be self-hosted here; removed in v2.12 when
   the site moved to a single font. It lives on in git history.) ---- */

/* ---- 76.2 the missing display-font token ----
   Ten rules across the file ask for var(--font-display), but the token
   was never defined, so headings silently fell back to the body font.
   (It pointed at Cinzel until v2.12; now every font token is the body
   font, section 81.) Article titles stay in the
   body font on purpose: user-written titles can be long, and they
   should match the feed's story titles. */
:root { --font-display: var(--font-mast); }
.reader__title { font-family: var(--font-body); }

/* ---- 76.3 the reading experience (article.html) ----
   A well-set book page: comfortable size, generous leading, a gold
   kicker, soft figures. */
.reader__body {
  font-size: 1.08rem;
  line-height: 1.75;
}
.reader__kicker {
  color: var(--gold);
  letter-spacing: 0.22em;
  font-size: 0.74rem;
}
.reader__byline { border-bottom-color: var(--paper-edge); }
.reader__hero,
.story__art-img {
  border: none;
  border-radius: 12px;
}
.reader__hero { margin: 0.2rem 0 1.4rem; }
.reader__archive-banner {
  background: var(--paper-tint);
  border: 1px solid color-mix(in srgb, var(--warm-gold) 45%, var(--paper-edge));
  border-radius: 10px;
  color: var(--ink-soft);
}
.reader__archive-banner a { color: var(--warm-gold); }
.reader__actions { border-top-color: var(--paper-edge); }

/* The quiet chrome above the reader and the archive: the way back. */
.reader-return {
  max-width: 720px;
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.reader-return a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
.reader-return a:hover,
.reader-return a:focus-visible { color: var(--gold); }
.reader-return__status { color: var(--gold-soft); }

/* ---- 76.4 masthead meta line (news.html) ----
   The old boxed rule strips are gone from the markup; this is their
   dignified successor — one quiet line under the title, with the date. */
.masthead__meta {
  margin: 0.8rem 0 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-family: var(--font-label);
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.masthead__meta-sep { color: var(--gold-soft); }

/* ---- 76.5 the greeting — the bulletin knows who walked in ---- */
.feed-greeting {
  max-width: var(--max-width);
  margin: 1.6rem auto -0.6rem;
  padding: 0 1.25rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
  font-style: italic;
}

/* ---- 76.6 feed chrome: the last print borders retire ---- */
.story { border-top: 1px solid var(--paper-edge); }
.story--lead,
.story--feature {
  border-top: none;
  position: relative;
  padding-top: 1.15rem;
}
.story--lead::before,
.story--feature::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--warm-red) 60%, transparent),
    color-mix(in srgb, var(--warm-gold) 60%, transparent),
    transparent);
}
/* Justified newspaper columns read badly on dark screens — set left. */
.story__body p { text-align: left; }
/* Kickers join the landing's warm gold voice. */
.story__kicker,
.folder__kicker { color: var(--warm-gold); }
.sidebar {
  border-color: var(--paper-edge);
  border-radius: 12px;
}
/* The artwork placeholder becomes the same velvet cushion as the
   landing's photo slots. */
.story__art {
  border: none;
  border-radius: 12px;
  position: relative;
  background:
    linear-gradient(150deg,
      color-mix(in srgb, var(--warm-red) 20%, var(--paper-tint)),
      color-mix(in srgb, var(--warm-gold) 15%, var(--paper-tint)));
}
.story__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("emblem.svg") center 42% / min(60%, 300px) no-repeat;
  opacity: 0.09;
  pointer-events: none;
}
.story__art span {
  position: absolute;
  left: 1rem; right: 1rem; bottom: 1.1rem;
  text-align: center;
  text-transform: uppercase;
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  color: color-mix(in srgb, var(--warm-gold) 75%, var(--ink));
  opacity: 0.62;
}

/* ---- 76.7 events strip: warm hairline, soft date tiles ---- */
.events {
  border-top: none;
  border-bottom: none;
  position: relative;
  padding-top: 1.9rem;
}
.events::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(600px, 84%);
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--warm-red) 55%, transparent),
    color-mix(in srgb, var(--warm-gold) 62%, transparent),
    transparent);
}
.event__date {
  border: 1px solid var(--paper-edge);
  border-radius: 8px;
  background: var(--paper-tint);
}

/* ---- 76.8 empty states with warmth ----
   Page-level empties get the emblem treatment; small inline empties
   get a quiet tinted card. Never a bare line of text in the dark. */
.feed-empty,
.cabinet__empty {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--paper-edge);
  border-radius: 16px;
  padding: 3.4rem 1.5rem;
  background:
    linear-gradient(150deg,
      color-mix(in srgb, var(--warm-red) 10%, var(--paper-tint)),
      color-mix(in srgb, var(--warm-gold) 8%, var(--paper-tint)));
}
.feed-empty::before,
.cabinet__empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("emblem.svg") center 30% / min(52%, 340px) no-repeat;
  opacity: 0.08;
  pointer-events: none;
}
.events__empty,
.admin__empty {
  background: var(--paper-tint);
  border: 1px solid var(--paper-edge);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---- 76.9 virtue pages: presence ----
   The roman numeral as a huge quiet watermark in the panel's corner
   (virtue.js sets --vg-numeral), and a slow breathing glow on the
   panel's edge. These are the site's most sacred pages — let them
   feel alive, gently. */
.virtue-page__panel {
  position: relative;
  overflow: hidden;
}
.virtue-page__panel::after {
  content: var(--vg-numeral, "");
  position: absolute;
  right: 0.02em;
  bottom: -0.24em;
  font-family: var(--font-mast);
  font-weight: 700;
  font-size: 11rem;
  line-height: 1;
  color: var(--vg, var(--gold));
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
}
@keyframes virtue-breathe {
  0%, 100% { box-shadow: 0 0 70px -22px color-mix(in srgb, var(--vg, var(--gold)) 55%, transparent); }
  50%      { box-shadow: 0 0 95px -16px color-mix(in srgb, var(--vg, var(--gold)) 75%, transparent); }
}
.virtue-page__panel { animation: virtue-breathe 8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .virtue-page__panel { animation: none; }
}


/* =====================================================================
   77. v2.6 — VERIFICARE ȘI ÎNTĂRIRE II
   Hardening release: no new features. The only visual addition is the
   access-code line in the master's dialog, which used to cram the code
   into the body text where the newlines collapsed.
   ===================================================================== */

/* The one-time access code, on its own big monospace line. */
.modal__code {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--warm-gold);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--paper-edge));
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin: 0 0 1rem;
  user-select: all;   /* one click selects the whole code */
}


/* =====================================================================
   78. v2.7 — BUTOANE ȘI TEMELIE
   The foundation pass: no new features, only the surfaces the buttons
   stand on. The last print-era hairlines (bright --ink borders on the
   inputs, the editor, article images, the sidebar label, the admin
   heading, ghost buttons) soften to the dark palette and take a radius
   from the 8/12/16/18 scale; the hard offset shadows on the landing
   become warm glows; the two admin rules that were invisible on dark
   get their light back; the JS-rendered tables scroll inside their own
   box so a phone never drags the page sideways; and the raw hexes left
   in sections 43 and 73 finally get names. Appended last, so it wins
   over the older rules on purpose.
   ===================================================================== */

/* ---- 78.1 tokens: the last raw hexes get a name ----
   These colors were typed as hex in sections 43 and 73. Naming them
   means one place to change them later; the rules underneath are
   re-declared here so the tokens are what actually applies. */
:root {
  --on-gold:      #14110c;   /* text sitting on a gold fill           */
  --toolbar-bg:   #2b3450;   /* editor toolbar button face            */
  --toolbar-edge: #46527a;   /* its border, and the toolbar dividers  */
  --mark-bg:      #ffe98c;   /* highlighted text                      */
  --mark-ink:     #1f1a14;   /* ...and the ink on it                  */
  --danger:       #e05b5b;   /* destructive actions, bright on dark   */
}

/* Section 43, re-declared through the tokens. */
::selection { color: var(--on-gold); }
.btn--primary { color: var(--on-gold); }

/* Sections 73.5 and 73.6, re-declared through the tokens. */
.virtue-page__nav .btn--primary { color: var(--on-gold); }
.editor__toolbar button {
  background: var(--toolbar-bg);
  border-color: var(--toolbar-edge);
}
.editor__toolbar button:hover,
.editor__toolbar button:focus-visible { color: var(--on-gold); }
.editor__sep { background: var(--toolbar-edge); }

/* Every highlight on the site now comes from one pair of tokens. */
.editor__toolbar mark,
.editor__toolbar button mark,
.editor__body mark,
.story__body mark,
.reader__body mark {
  background: var(--mark-bg);
  color: var(--mark-ink);
}

/* ---- 78.2 one masthead for every inner page ----
   Two title variants were in play (.masthead__title--roman on login,
   admin, profile, questions, support and 404; plain everywhere else)
   and the cascade quietly flattened both to the same small size, so
   the --roman intent never actually showed. One rule settles it: the
   size and tracking that variant always meant, for all of them. */
.masthead--small .masthead__title {
  font-family: var(--font-label);   /* the site's one font */
  font-weight: 700;
  /* Sized to sit UNDER the bulletin's own masthead (news.html), not
     above it: the inner pages carry the wordmark, they don't shout it. */
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  letter-spacing: 0.05em;
}

/* ---- 78.3 the last print hairlines retire ----
   Every border below computed to the bright --ink (#f2f2ef): the white
   frame of the old newspaper. On a dark page that reads as a cut line,
   not an edge. They move to the palette's own border colors and pick a
   radius from the scale. The gold keyboard focus ring (section 61)
   stays exactly as it is. */

/* Text fields and selects. */
.form input[type=text],
.form input[type=password],
.form input[list],
.form select {
  border-color: var(--paper-edge);
  border-radius: 8px;
}
/* The mouse-focus ring on these was red while the keyboard ring is
   gold; one gold ring for both is the honest answer. */
.form input:focus,
.form select:focus,
.editor__body:focus { outline-color: var(--gold); }

/* Buttons: soft edge, small-control radius, a warm hover on ghosts. */
.btn { border-radius: 8px; }
/* Links styled as buttons inherit the page line-height, so they sat a
   couple of pixels taller than the real <button>s beside them. The edit
   flow puts an <a class="btn"> in every action row: same line box. */
a.btn { line-height: normal; }
.btn--ghost { border-color: var(--paper-edge); }
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: color-mix(in srgb, var(--gold) 12%, var(--paper-tint));
  border-color: color-mix(in srgb, var(--gold) 45%, var(--paper-edge));
  color: var(--ink);
}

/* Login tabs: a rounded pair, and the active one wears gold instead of
   a slab of white. */
.tabs {
  border-color: var(--paper-edge);
  border-radius: 8px;
}
/* The corners are rounded on the tabs themselves rather than clipping
   the container: overflow:hidden would also clip the keyboard focus
   ring, which is drawn just outside each tab. */
.tabs__tab { border-right-color: var(--paper-edge); }
.tabs__tab:first-child { border-radius: 8px 0 0 8px; }
.tabs__tab:last-child  { border-radius: 0 8px 8px 0; }
.tabs__tab--active {
  background: color-mix(in srgb, var(--gold) 14%, var(--paper-tint));
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--gold);
}

/* The editor, and the pictures inside it and inside a published story. */
.editor {
  border-color: var(--paper-edge);
  border-radius: 12px;
}
/* Same idea as the tabs: round the toolbar and the body instead of
   clipping the box, so the editor's focus outline stays visible. */
.editor__toolbar { border-radius: 12px 12px 0 0; }
.editor__body    { border-radius: 0 0 12px 12px; }
.editor__body img,
.story__body img {
  border-color: var(--paper-edge);
  border-radius: 12px;
}
.hero-upload__preview {
  border-color: var(--paper-edge);
  border-radius: 12px;
}

/* The month's DeMolay photo. */
.profile__photo {
  border-color: var(--paper-edge);
  border-radius: 12px;
}
/* The sidebar label was caged between two white rules; one soft line
   under it keeps it anchored without the box. */
.sidebar__label {
  border-top: none;
  border-bottom: 1px solid var(--paper-edge);
  padding: 0 0 0.5rem;
}

/* Admin section headings: a quiet gold-tinted line instead of a 2px
   white print rule. */
.admin__heading {
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 30%, var(--paper-edge));
}

/* ---- 78.4 the tables scroll, the page does not ----
   admin.js and mychapter.js render a <table> into each of these
   containers. On a 390 px phone the members table is 450 px wide and
   used to drag the whole page sideways with it. Now the box scrolls
   and the page holds still. */
#admin-chapters,
#admin-members,
#admin-articles-published,
#admin-articles-archived,
#admin-bulk-result,
#mychapter-roster {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;   /* momentum scrolling on iOS */
}
/* The bulk result draws its own bordered box, so the table scrolls
   inside that box and the border stays whole. */
.admin__bulk-result {
  overflow-x: auto;
  border-radius: 12px;
}

/* ---- 78.5 shadows become glows ----
   The 5px / 6px hard offset shadows were a paper-cutout trick from the
   cream theme. On dark, the site's own signature is a warm bloom. */
/* Section 51 already strips the frame off the two slots that exist on
   the landing (the fused hero and two-col panels ARE the frame), so
   this only shows if a photo slot is ever used outside such a panel.
   It is here so the hard shadow in section 43 is not what it inherits. */
.photo-slot__frame {
  border-color: var(--paper-edge);
  border-radius: 16px;
  box-shadow: 0 16px 40px -24px color-mix(in srgb, var(--warm-gold) 40%, transparent);
}

/* ---- 78.6 two rules that were invisible on dark ----
   Both were black at 2–4% opacity, written for the cream paper: a row
   hover you could not see and a code chip with no chip. */
.admin__table tr:hover td {
  background: color-mix(in srgb, var(--gold) 7%, transparent);
}
.admin__table code {
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  color: var(--gold-soft);
}

/* ---- 78.7 the last square corners standing next to rounded cards ---- */
.admin__stat {
  border-color: var(--paper-edge);
  border-radius: 12px;
}


/* =====================================================================
   79. v2.8 — ACCESIBILITATE ȘI VITEZĂ
   The keyboard-and-phone pass: nothing new to look at, only things that
   were unusable if you were not holding a mouse on a wide screen. The
   red used for small text was too dark against the slate to be read
   comfortably, so it gets one lighter sibling token and the four rules
   that needed it are re-declared. And the card nav, which on a 390 px
   phone was 585 px wide inside a 350 px box, quietly hiding the bell and
   the "Deconectare" button off the right edge, is put on a diet at that
   width: the bulletin button steps into the cards (where its link
   already lives), the rest tightens, and everything fits. Appended
   last, so it wins over the older rules on purpose.
   ===================================================================== */

/* ---- 79.1 one more ink: red you can actually read ----
   --accent (#e0484a) is the site's red, and it is right for borders,
   fills and big display type. As SMALL text on the dark slate it lands
   at 4.25:1 on --paper and 3.72:1 on --paper-tint, under the 4.5:1 that
   body text needs. Lifting it a fifth of the way toward --ink keeps the
   same red, at 5.37:1 and 4.71:1. One token, so the next person changes
   it in one place. */
:root {
  --ink-red: color-mix(in srgb, var(--accent) 80%, var(--ink));
}

/* The four places that print small red text, re-declared. */
.form__error        { color: var(--ink-red); }  /* "Completează ambele câmpuri." */
.sidebar__label     { color: var(--ink-red); }  /* "DeMOLAY-UL LUNII" */
.colophon__designer { color: var(--ink-red); }  /* "Designed by Matei Dinca" */
.role-pill--chapter { color: var(--ink-red); border-color: var(--ink-red); }

/* The danger button's own red (#e05b5b) reads 4.17:1 inside a modal,
   which is where it is used most. Same treatment; the filled hover keeps
   the full-strength red behind dark text, which was never the problem. */
.btn--danger {
  color: var(--ink-red);
  border-color: var(--ink-red);
}
.btn--danger:hover,
.btn--danger:focus-visible {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--on-gold);
}

/* ---- 79.2 the card nav fits a phone ----
   Measured at 390 px before this rule: .cardnav clientWidth 350 px,
   scrollWidth 585 px. The bar's own overflow:hidden meant the page
   never scrolled sideways, so the breakage was invisible in a scroll
   test, but the notification bell and "Deconectare" were simply cut off
   the right edge and could not be tapped at all.

   The fix is the pattern the nav already uses: section 44 hides the
   "Profil" button under 760 px because the same link sits in the
   "Contul tău" card. Under 420 px the gold "DeMolay Monthly" button
   does the same, and its link is the first one in the "Buletin" card.
   Everything else tightens a notch. The brand keeps its full name, the
   burger and the logout button stay where a thumb expects them. */
@media (max-width: 420px) {
  .cardnav__bar {
    padding: 0.5rem 0.55rem;
    gap: 0.35rem;
  }

  .cardnav__burger { width: 34px; height: 34px; }
  .cardnav__actions { gap: 0.3rem; }
  .cardnav__actions .cn-btn {
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    padding: 0.5rem 0.5rem;
  }
  .cn-bell { width: 34px; height: 34px; }
}

/* ---- 79.3 the landing hero stacks on a phone again ----
   Section 42 tells .landing__hero to become one column under 860 px.
   Section 51 then re-declares its two columns for the "fused panel"
   look, with no media query, and being later in the file it wins at
   EVERY width. So on a 360 px phone the hero stayed side by side: the
   text got 208 px and the photo a 105 px strip, 874 px tall, with its
   caption spilling out of the frame. The hero's own overflow:hidden hid
   the spill from a scroll test, which is why it survived this long.
   One line puts section 42's intent back, at the same breakpoint. */
@media (max-width: 860px) {
  .landing__hero { grid-template-columns: 1fr; }
}


/* =====================================================================
   80. v2.10 — FEȚELE FRĂȚIEI
   The text pages finally show the people they talk about. Despre noi,
   Descoperă, Ce facem, Întrebări, Ajutor and the seven virtues each get
   real chapter photos (public/images/pages/), in two shapes the site
   already speaks: a fused text + photo panel for plain sections (the
   same box as "Ce este DeMolay" on the landing), and a wide photo band
   under the heading of a tinted section. The landing itself is left
   alone on purpose. Appended last, so it wins over the older rules.
   ===================================================================== */

/* ---- 80.1 the page photo ----
   The figure owns the shape, so the page never jumps while the photo
   loads (the warm gradient shows until it arrives). The photo fills the
   figure and is cropped around --focus, an "x% y%" point each page sets
   on the figure: a portrait and a group shot need different crops, and
   the faces must never be the part that gets cut. */
.page-photo {
  position: relative;
  margin: 1.4rem 0 1.8rem;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--paper-edge);
  background:
    linear-gradient(150deg,
      color-mix(in srgb, var(--warm-red) 20%, var(--paper-tint)),
      color-mix(in srgb, var(--warm-gold) 15%, var(--paper-tint)));
  box-shadow: 0 16px 40px -24px color-mix(in srgb, var(--warm-gold) 40%, transparent);
}
.page-photo img,
.virtue-page__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 40%);
  display: block;
}

/* ---- 80.2 inside a fused panel the panel IS the frame ----
   Same rule section 51 gives the landing's photo slots: no frame of its
   own, flush to the panel's edge, as tall as the text beside it. */
.landing__two-col > .page-photo {
  margin: 0;
  aspect-ratio: auto;
  min-height: 340px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* ---- 80.3 inside a card (Întrebări, Ajutor) ---- */
.card .page-photo {
  aspect-ratio: 16 / 9;
  margin: 1.2rem 0 1.6rem;
  border-radius: 12px;
}

/* ---- 80.4 the virtue pages: the photo crowns the panel ----
   It runs to the panel's edges (the negative margins undo the panel's
   2.25rem padding; the panel already clips to its rounded corners) and
   melts into the panel at the bottom, so the numeral and the title
   read as rising out of the picture. */
.virtue-page__photo {
  position: relative;
  margin: -2.25rem -2.25rem 1.6rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: color-mix(in srgb, var(--vg, var(--gold)) 14%, var(--paper-tint));
}
.virtue-page__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Only the bottom third fades: enough to melt into the panel, never
     so much that the faces near the bottom go dark. */
  background: linear-gradient(to bottom, transparent 64%, var(--paper-tint));
  pointer-events: none;
}

/* ---- 80.5 phones ----
   A 16:7 band is a thin strip on a phone and the faces become specks,
   so bands get taller; stacked panels keep the text first (the order
   section 42 intended) and give the photo a proper shape of its own. */
@media (max-width: 860px) {
  .landing__two-col > .page-photo {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
  .landing__two-col--reverse > .page-photo { order: 2; }
}
@media (max-width: 600px) {
  .page-photo { aspect-ratio: 4 / 3; }
  .card .page-photo { aspect-ratio: 4 / 3; }
  .virtue-page__photo { aspect-ratio: 4 / 3; }
}


/* =====================================================================
   81. v2.12 — O SINGURĂ LITERĂ
   One font across the whole site, bold for titles, and a quieter nav.
   The font change itself lives in the §1 tokens (every display and
   label token is now an alias of --font-body); this section catches the
   few places that named a font directly, makes every title bold, and
   re-lays the floating nav now that its middle text is gone. Appended
   last, so it wins over the older rules on purpose.
   ===================================================================== */

/* ---- 81.1 the stragglers: no typewriter font anywhere ----
   Access codes and usernames used a monospace font. The code alphabet
   has no look-alike characters (no I, O, 0 or 1), so the site's own
   font reads them just as safely; tabular figures keep the digits even. */
code,
.admin__table code,
.modal__code {
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
}
/* Form controls do NOT inherit the page font by default in browsers;
   without this, inputs and plain buttons would quietly use a second font. */
button, input, select, textarea { font-family: inherit; }

/* ---- 81.2 titles are bold ----
   Every heading, plus the few titles that are not heading elements
   (the page title in the masthead, the footer name, the miniature
   bulletin cover on the landing). Cinzel's wide letter-spacing made
   sense for a display serif; a bold sans reads better set tight. */
h1, h2, h3, h4,
.masthead__title,
.colophon__title,
.monthly-cover__masthead,
.events__title { font-weight: 700; }
.masthead__title,
.masthead--small .masthead__title { letter-spacing: -0.01em; }

/* ---- 81.3 the nav island without its middle text ----
   The bar was a three-column grid (left / brand / right). With the
   brand gone, the two ends simply sit apart. */
.cardnav__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Section 79 hid the gold "DeMolay Monthly" button on phones only
   because the brand text left no room for it. The room is back, so the
   button returns, a notch smaller so the bar still fits a 360 px phone. */
@media (max-width: 420px) {
  .cardnav__left .cn-btn--gold {
    display: inline-block;
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    padding: 0.5rem 0.5rem;
  }
}

/* The menu cards gained a "Pagina principală" link (the way home that the
   brand text used to be). On phones the three cards stack, and the
   master's open menu measured 555 px against the old 560 px ceiling, so
   one wrapped link would have clipped it. More headroom; the open/close
   animation only runs a touch faster. */
@media (max-width: 760px) {
  .cardnav--open .cardnav__panel { max-height: 760px; }
}


/* =====================================================================
   82. v2.14 — PRIMA PAGINĂ PRIMEȘTE FOTOGRAFIILE
   The landing's two photo slots get real, built-in photos (files in
   images/landing/, written into index.html). A photo the master uploads
   with the ✎ button still replaces them, and removing that upload brings
   the built-in one back (landing.js). The hero keeps its fused panel;
   the "Ce este DeMolay" panel is rearranged around its photo.
   ===================================================================== */

/* ---- 82.1 "Ce este DeMolay": photo band on top ----
   In the old two-column panel the photo half stretched to the height of
   the text AND the "Pentru părinți" box: a 484 x 828 strip at 1280 px,
   narrower still on a small laptop. A group photo shows two or three
   people in a strip like that. Now the photo is a wide band across the
   top of the panel (the panel's rounded corners clip it), and the text
   and the parents box sit side by side underneath. */
.landing__two-col--band {
  grid-template-columns: 1.1fr 0.9fr;
}
.landing__two-col--band > .photo-slot {
  grid-column: 1 / -1;
  display: block;
}
.landing__two-col--band .photo-slot__frame {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 7;
}
/* The parents box is its own column now, not the end of the text one.
   It lines up with the kicker and keeps its own (smaller) padding. */
.landing__two-col--band > .landing__parents {
  align-self: start;
  margin: 2.5rem 2.5rem 2.5rem 0;
  padding: 1.1rem 1.4rem;
}

/* Phones and narrow windows: one column, band first, then the text,
   then the parents box. The band gets taller so faces stay big. */
@media (max-width: 860px) {
  .landing__two-col--band { grid-template-columns: 1fr; }
  .landing__two-col--band .photo-slot__frame { aspect-ratio: 16 / 10; }
  .landing__two-col--band > .landing__parents { margin: 0 1.4rem 1.75rem; }
}
@media (max-width: 600px) {
  .landing__two-col--band .photo-slot__frame { aspect-ratio: 4 / 3; }
}


/* =====================================================================
   83. v3.0 — THE LOGO ON EVERY PAGE
   The inner pages carried the name as typeset text ("DeMolay România");
   they now carry the same wordmark image as the landing (logo.svg), a
   size smaller: the inner pages show the logo, they don't open with a
   banner. The bulletin pages keep their "DeMolay Monthly" title.
   ===================================================================== */
.masthead__logo--small { margin: 0.35rem 0 0.2rem; }
.masthead__logo--small img { width: min(300px, 62vw); }
.masthead__logo--small a { display: inline-block; }
.masthead__logo--small a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
  border-radius: 6px;
}


/* =====================================================================
   84. v3.1 — UN SITE ADEVĂRAT
   The finishing pieces every real website has: skeleton loading instead
   of "Se încarcă…" lines, a cookie notice, the two legal pages (Termeni
   și condiții; Confidențialitate și cookie-uri) and their links in every
   footer. All of it is new markup; nothing older is overridden.
   ===================================================================== */

/* ---- 84.1 text only screen readers hear ---- */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- 84.2 skeleton loading ----
   Soft grey shapes in the layout of what is coming, with a slow light
   sweeping across them (none with "reduce motion"). The static pages
   carry the markup directly, so it shows on the very first paint; the
   scripts build the same shapes with DM.ui.skeleton() (ui.js). Each
   skeleton sits INSIDE the container its page script replaces, so it
   disappears the moment the real content (or an error message) arrives. */
.skel {
  display: grid;
  gap: 0.75rem;
  padding: 0.35rem 0;
}
/* The wrapper spans every column when its container is a grid (the
   master panel's number tiles). */
.skel-wrap { grid-column: 1 / -1; }
.skel__bar,
.skel__box {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 8%, var(--paper-tint));
}
.skel__bar { height: 0.85rem; width: 100%; }
.skel__bar--kicker { height: 0.7rem; width: 24%; }
.skel__bar--title { height: 1.5rem; width: 62%; }
.skel__bar--mid { width: 76%; }
.skel__bar--short { width: 44%; }
.skel__bar--inline {
  display: inline-block;
  vertical-align: middle;
  width: min(14ch, 70%);
  height: 1em;
}
.skel__box { height: 5.5rem; }
.skel__box--photo { height: auto; aspect-ratio: 16 / 7; }
.skel__box--tall { height: auto; aspect-ratio: 4 / 3; }
.skel__bar::after,
.skel__box::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--ink) 10%, transparent),
    transparent);
  animation: skel-sweep 1.6s ease-in-out infinite;
}
@keyframes skel-sweep { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .skel__bar::after,
  .skel__box::after { display: none; animation: none; }
}

/* rows: tables and lists (master panel, roster, notifications, archive) */
.skel__row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--paper-edge);
}
.skel__row:last-child { border-bottom: none; }
/* boxes side by side: the master panel's number tiles, event cards */
.skel--tiles {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}
.skel__card { display: grid; gap: 0.6rem; align-content: start; }
/* the bulletin front page: a lead story, then a row of cards */
.skel__lead {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 1.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--paper-edge);
}
.skel__lead .skel { align-content: start; }
.skel__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
@media (max-width: 700px) {
  .skel__lead { grid-template-columns: 1fr; }
  .skel__row { grid-template-columns: 1.6fr 1fr; }
  .skel__row > :nth-child(3) { display: none; }
}

/* ---- 84.3 the cookie notice ----
   Bottom left, so it never sits on the toasts (bottom right). Under the
   pop-ups (150), the toasts (200) and the menu (300). It informs; it
   does not ask: the site only uses storage that is strictly necessary,
   which needs no consent (see confidentialitate.html#cookies). */
.cookie-note {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 140;
  max-width: 25rem;
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: var(--paper-tint);
  border: 1px solid var(--paper-edge);
  border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.75);
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}
.cookie-note p { margin: 0; }
.cookie-note a { color: var(--gold); }
.cookie-note__actions {
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 600px) {
  .cookie-note { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; max-width: none; }
}

/* ---- 84.4 legal links in every footer ---- */
.colophon__legal {
  margin: 0.9rem 0 0;
  font-size: 0.82rem;
  line-height: 1.9;
}
.colophon__legal a { color: var(--ink-soft); }
.colophon__legal a:hover,
.colophon__legal a:focus-visible { color: var(--gold); }
.colophon__sep {
  margin: 0 0.55rem;
  color: var(--rule);
}

/* ---- 84.5 the legal pages ---- */
.legal { max-width: 46rem; }
.legal .card { padding-bottom: 1.75rem; }
.legal h3 {
  margin: 1.9rem 0 0.6rem;
  scroll-margin-top: 6.5rem;   /* anchors land below the floating nav */
}
.legal p,
.legal li { line-height: 1.7; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.35rem; }
.legal__updated {
  margin: 0.25rem 0 1.25rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.legal__summary {
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: rgba(0, 0, 0, 0.25);
}
.legal__toc {
  columns: 2;
  column-gap: 1.5rem;
  padding: 0;
  margin: 1.25rem 0 0.5rem;
  list-style: none;
  font-size: 0.92rem;
}
.legal__toc li { break-inside: avoid; margin-bottom: 0.3rem; }
.legal__toc a { color: var(--gold); }
/* The organisation's legal details: a dashed gold box until the
   Jurisdiction fills them in, so a missing detail can't go unnoticed. */
.legal__todo {
  padding: 0.75rem 1rem;
  border: 1px dashed var(--gold);
  border-radius: 10px;
  background: color-mix(in srgb, var(--gold) 8%, transparent);
  color: var(--ink);
}
.legal__table-wrap { overflow-x: auto; margin: 0.75rem 0 1rem; }
.legal table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.legal th,
.legal td {
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--paper-edge);
  text-align: left;
  vertical-align: top;
}
.legal th { color: var(--ink); font-weight: 700; }
.legal td code { font-size: 0.85em; }
@media (max-width: 600px) {
  .legal__toc { columns: 1; }
}

/* ---- 84.6 the nav while "who is logged in?" is still loading ----
   A grey pill the size of the "Autentificare" button (auth.js), so the
   bar doesn't flash the logged-out button at a logged-in member. */
.cn-skel {
  display: inline-block;
  width: 7.5rem;
  height: 2rem;
  border-radius: 8px;
}


/* =====================================================================
   85. v3.2 — ULTIMA VERIFICARE
   The last test release before launch. One layout rule: an empty front
   page (launch day, fresh database) keeps its four sidebars, so the
   master can set them up before the first article. The welcome card
   takes the lead article's two columns; feed.js puts the sidebars after it.
   ===================================================================== */

/* ---- 85.1 the empty front page, shaped like a lead article ---- */
.feed-empty--lead { grid-column: span 2; }
@media (max-width: 600px) {
  .feed-empty--lead { grid-column: span 1; }
}
