/* ===================================================================
   CirrusRO roadmap, INFOGRAPHIC board
   Numbered phase columns for roadmap.md. Plain HTML in the markdown
   (md_in_html is on), so there is no plugin and the layout is ours.

   WHY THIS SHAPE: the operator's list is 22 items given in a deliberate
   order. A Now/Next/Later board cannot carry that: three lanes holding 22
   cards go lopsided, and "Later" turns into a dumping ground (the known
   failure of that format). Numbered phase columns keep the exact order
   readable, stay balanced at 7-8 items per column, and let CATEGORY colour
   do the second job of showing what kind of work is clustered where.

   Two independent visual channels, deliberately not mixed:
     - POSITION  = the order the items were given (01..22, phase columns)
     - COLOUR    = the category (events, economy, cosmetics, pets, cards, combat)
   Colour never encodes priority, so recolouring an item cannot silently
   reorder the roadmap.

   THEME: the wiki defaults to slate, so the panel keeps the sky metaphor in
   both schemes: pale daytime sky in light, deep night sky in dark.
   =================================================================== */

.rm-board {
  /* category palette (light scheme) */
  --c-events:    #E8663C;
  --c-economy:   #D89A12;
  --c-cosmetics: #B45FD1;
  --c-pets:      #2FA36B;
  --c-cards:     #3E8BD0;
  --c-combat:    #D94A57;

  --rm-panel-1: #EAF6FF;
  --rm-panel-2: #C7E6FF;
  --rm-card-bg: rgba(255, 255, 255, 0.92);
  --rm-card-brd: rgba(19, 75, 134, 0.12);
  --rm-ink: #0B2B4A;
  --rm-ink-soft: #43617E;
  --rm-shadow: 0 8px 22px -14px rgba(11, 43, 74, 0.5);

  position: relative;
  margin: 2rem 0 2.5rem;
  padding: 1.6rem 1.3rem 1.4rem;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(165deg, var(--rm-panel-1) 0%, var(--rm-panel-2) 100%);
  color: var(--rm-ink);
}

[data-md-color-scheme="slate"] .rm-board {
  --c-events:    #FF8A5F;
  --c-economy:   #F0B93C;
  --c-cosmetics: #CE87E4;
  --c-pets:      #4FC08D;
  --c-cards:     #6FB0E6;
  --c-combat:    #F0707C;

  --rm-panel-1: #12243B;
  --rm-panel-2: #0B1626;
  --rm-card-bg: rgba(255, 255, 255, 0.055);
  --rm-card-brd: rgba(159, 210, 255, 0.15);
  --rm-ink: #E8F2FB;
  --rm-ink-soft: #A8C0D6;
  --rm-shadow: 0 8px 22px -14px rgba(0, 0, 0, 0.8);
}

/* decorative clouds, kept behind everything */
.rm-board::before,
.rm-board::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: 0.45;
  filter: blur(2px);
  pointer-events: none;
}
.rm-board::before { width: 240px; height: 76px; top: -24px;   right: -40px; }
.rm-board::after  { width: 300px; height: 94px; bottom: -48px; left: -60px; opacity: 0.28; }
[data-md-color-scheme="slate"] .rm-board::before,
[data-md-color-scheme="slate"] .rm-board::after { opacity: 0.05; }

/* ---------- board header ---------- */
.rm-board-head {
  position: relative;
  text-align: center;
  max-width: 34rem;
  margin: 0 auto 1.2rem;
}
.md-typeset .rm-board-head h2 {
  font-family: "Fredoka", var(--md-text-font-family), sans-serif;
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.15;
  margin: 0 0 0.55rem;
  padding: 0;
  color: var(--rm-ink);
  border: none;                 /* Material underlines h2 by default */
}
/* short gradient rule under the title, tying the header to the category
   palette instead of leaving it as plain centred text */
.md-typeset .rm-board-head h2::after {
  content: "";
  display: block;
  width: 68px;
  height: 3px;
  margin: 0.45rem auto 0;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    var(--c-events) 0%,
    var(--c-economy) 33%,
    var(--c-pets) 66%,
    var(--c-cards) 100%
  );
}
.rm-board-head p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--rm-ink-soft);
}

/* ---------- category legend ---------- */
.rm-legend {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.8rem;
  margin-bottom: 1.3rem;
}
.rm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--rm-ink-soft);
}
.rm-legend i { width: 9px; height: 9px; border-radius: 50%; font-style: normal; }

/* ---------- phase columns ---------- */
.rm-phases {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
  min-width: 0;
}
/* grid/flex children default to min-width:auto and refuse to shrink below their
   content, which pushes the board past narrow viewports. */
.rm-phase, .rm-item { min-width: 0; }

.rm-phase-head {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0 0.15rem 0.5rem;
  border-bottom: 2px solid var(--rm-card-brd);
  margin-bottom: 0.7rem;
}
.rm-phase-name {
  font-family: "Fredoka", var(--md-text-font-family), sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--rm-ink);
  flex: 1;
}
.rm-phase-range {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--rm-ink-soft);
  white-space: nowrap;
}

/* ---------- numbered item ---------- */
.rm-item {
  --c: var(--rm-ink-soft);
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.5rem;
  border-radius: 11px;
  background: var(--rm-card-bg);
  border: 1px solid var(--rm-card-brd);
  border-left: 3px solid var(--c);
  box-shadow: var(--rm-shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.rm-item:hover {
  transform: translateY(-2px);
  border-color: var(--c);
  box-shadow: 0 14px 28px -14px rgba(11, 43, 74, 0.55);
}

.rm-num {
  font-family: "Fredoka", var(--md-text-font-family), sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c);
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.rm-item-body { min-width: 0; }
.rm-item-title {
  font-family: "Fredoka", var(--md-text-font-family), sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.28;
  color: var(--rm-ink);
  margin: 0 0 0.1rem;
  overflow-wrap: anywhere;
}
.rm-item-desc {
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--rm-ink-soft);
  margin: 0;
  overflow-wrap: anywhere;
}

/* category -> accent. One variable drives number, left edge and hover border. */
.cat-events    { --c: var(--c-events); }
.cat-economy   { --c: var(--c-economy); }
.cat-cosmetics { --c: var(--c-cosmetics); }
.cat-pets      { --c: var(--c-pets); }
.cat-cards     { --c: var(--c-cards); }
.cat-combat    { --c: var(--c-combat); }

.l-events    { background: var(--c-events); }
.l-economy   { background: var(--c-economy); }
.l-cosmetics { background: var(--c-cosmetics); }
.l-pets      { background: var(--c-pets); }
.l-cards     { background: var(--c-cards); }
.l-combat    { background: var(--c-combat); }

/* ---------- footer note ---------- */
.rm-foot {
  position: relative;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rm-card-brd);
  text-align: center;
  font-size: 0.66rem;
  color: var(--rm-ink-soft);
}

/* ---------- responsive ----------
   Three columns stop working before Material's content column gets narrow, so
   drop to two and then one rather than letting the cards squeeze. */
@media screen and (max-width: 74.9em) {
  .rm-phases { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 44.9em) {
  .rm-phases { grid-template-columns: 1fr; gap: 1.4rem; }
  .rm-board { padding: 1.3rem 1rem; }
}
