/* ONLY non-Roman Ancient Table formatting  */
/* Self-contained blocks, order: Greek / Blue / AOC  */
/* NOTE: --tabl-opaq now lives in Headers-Fonts-P_all_2a.css (global). Link that file too. */

/* used for div.header-panel like a 1-cell table to hide background map  */
    .header-panel-light {
      display: flex;
      flex-direction: column;   /* stack children vertically */
      align-items: flex-start;  /* keep text left-aligned */
      gap: .3rem;    /*  vertical spacing */
      background-color: rgba(248, 247, 247, var(--tabl-opaq));
      padding: 1rem;
      border-radius: 10px;
    }

    .header-panel-dark {
      display: flex;
      flex-direction: column;   /* stack children vertically */
      align-items: flex-start;  /* keep text left-aligned */
      gap: .3rem;    /*  vertical spacing */
      background-color: rgba(20, 20, 20, var(--tabl-opaq));
      padding: 1rem;
      border-radius: 10px;
    }

  /* THEME TUNING VARIABLES
     bg = table/cell backgrounds
     p  = paragraph colors
     pfl = paragraph first-letter colors
  */


/* #############################################################################
   ===========================================================================
   GREEK  (self-contained block)
   ===========================================================================
   ############################################################################# */

 /* ---- geometry ---- */
   .Greek {
     height: auto;
     border-collapse: separate;
     border-spacing: 0.5rem;
     vertical-align: top;
     display: block;
   }
   .Greek th,
   .Greek td {
     padding: 1rem;
     text-align: center;   /* Greek now centered too, per request */
   }

 /* ---- TABLE + CELL BORDERS ---- */
   .Greek {
     border: 4px solid rgba(82,82,84, var(--tabl-opaq));   /* entire-table border */
   }
   .Greek th,
   .Greek td {
     border: 1px solid rgba(26,56,52, var(--tabl-opaq));   /* 1px KEPT per request -- dk green */
   }

 /* ---- VARIABLES ---- */
   .Greek {
     background-color: rgba(187,187,187, var(--tabl-opaq));  /* interstitial table color */

     --bg-odd: 240,248,255;            /* aliceblue   */
     --bg-firstcol-odd: 156,186,193;   /* muted cyan  */

     --bg-even: 110,97,111;            /* mauve-grey  */
     --bg-firstcol-even: 184,167,200;  /* lt purple   */

     --p-odd: 0,0,0;
     --p-firstcol-odd: 66,64,64;       /* #424040 */

     --p-even: 255,255,255;
     --p-firstcol-even: 26,56,52;      /* #1a3834 */

     /* --pfl-* are NEW (Greek had none) -- invented, tune freely */
     --pfl-odd: 26,56,52;              /* dk green     */
     --pfl-firstcol-odd: 20,50,70;     /* deep navy    */
     --pfl-even: 200,210,215;          /* pale cool    */
     --pfl-firstcol-even: 74,47,90;    /* deep purple  */
   }

 /* ---- BACKGROUND + BASE TEXT ---- */
   .Greek tr:nth-child(odd) td {
     background-color: rgba(var(--bg-odd), var(--tabl-opaq));
     color: rgb(var(--p-odd));
   }
   .Greek tr:nth-child(odd) td:nth-child(3n+1) {
     background-color: rgba(var(--bg-firstcol-odd), var(--tabl-opaq));
     color: rgb(var(--p-firstcol-odd));
   }
   .Greek tr:nth-child(even) td {
     background-color: rgba(var(--bg-even), var(--tabl-opaq));
     color: rgb(var(--p-even));
   }
   .Greek tr:nth-child(even) td:nth-child(3n+1) {
     background-color: rgba(var(--bg-firstcol-even), var(--tabl-opaq));
     color: rgb(var(--p-firstcol-even));
   }

 /* ---- PARAGRAPH COLORS ---- */
   .Greek tr:nth-child(odd) td p:not([class]) { color: rgb(var(--p-odd)); }
   .Greek tr:nth-child(odd) td:nth-child(3n+1) p:not([class]) { color: rgb(var(--p-firstcol-odd)); }
   .Greek tr:nth-child(even) td p:not([class]) { color: rgb(var(--p-even)); }
   .Greek tr:nth-child(even) td:nth-child(3n+1) p:not([class]) { color: rgb(var(--p-firstcol-even)); }

 /* ---- PARAGRAPH 1st LETTER ---- */
   .Greek tr:nth-child(odd) td p:not([class])::first-letter {
     color: rgb(var(--pfl-odd)); font-size: 2.0em;
   }
   .Greek tr:nth-child(odd) td:nth-child(3n+1) p:not([class])::first-letter {
     color: rgb(var(--pfl-firstcol-odd)); font-size: 2.4em;
   }
   .Greek tr:nth-child(even) td p:not([class])::first-letter {
     color: rgb(var(--pfl-even)); font-size: 2.0em;
   }
   .Greek tr:nth-child(even) td:nth-child(3n+1) p:not([class])::first-letter {
     color: rgb(var(--pfl-firstcol-even)); font-size: 2.4em;
   }


/* #############################################################################
   ===========================================================================
   BLUE  (self-contained block -- CONVERTED from old nested syntax to Pattern A)
   Colors preserved exactly from vars-2e .Blue (which used p{} / p::first-letter{})
   ===========================================================================
   ############################################################################# */

 /* ---- geometry ---- */
   .Blue {
     height: auto;
     border-collapse: separate;
     border-spacing: 0.5rem;
     vertical-align: top;
     display: block;
   }
   .Blue th,
   .Blue td {
     padding: 1rem;
     text-align: center;
   }

 /* ---- TABLE + CELL BORDERS ---- */
 /* NOTE: source .Blue had NO explicit table/cell border rules (inherited none in vars-2e). */
 /* Added to match pattern; values mirror Imperial-family neutral. Tune or delete if unwanted. */
   .Blue {
     border: 4px solid rgba(82,82,84, var(--tabl-opaq));   /* entire-table border (NEW) */
   }
   .Blue th,
   .Blue td {
     border: 2px solid rgba(31,31,84, var(--tabl-opaq));   /* navy cell border (NEW) */
   }

 /* ---- VARIABLES  (extracted from the old nested .Blue colors) ---- */
   .Blue {
     /* source had no interstitial for .Blue; left transparent-ish neutral. Tune if wanted. */
     background-color: rgba(42,42,40, var(--tabl-opaq));   /* interstitial (NEW, neutral) */

     /* odd rows: bg 210,209,209 / text #823434 / pfl #4d1f1f */
     --bg-odd: 210,209,209;
     --p-odd: 130,52,52;               /* #823434 */
     --pfl-odd: 77,31,31;              /* #4d1f1f */

     /* odd cell-1: bg 11,10,255 / p #ffffff / pfl #e2e22c */
     --bg-firstcol-odd: 11,10,255;
     --p-firstcol-odd: 255,255,255;
     --pfl-firstcol-odd: 226,226,44;   /* #e2e22c */

     /* even rows: bg 73,73,73 / p #ffffff / pfl #bbbbbb */
     --bg-even: 73,73,73;
     --p-even: 255,255,255;
     --pfl-even: 187,187,187;          /* #bbbbbb */

     /* even cell-1: bg 32,45,128 / p #ff3333 / pfl #b31e1e */
     --bg-firstcol-even: 32,45,128;
     --p-firstcol-even: 255,51,51;     /* #ff3333 */
     --pfl-firstcol-even: 179,30,30;   /* #b31e1e */
   }

 /* ---- BACKGROUND + BASE TEXT ---- */
   .Blue tr:nth-child(odd) td {
     background-color: rgba(var(--bg-odd), var(--tabl-opaq));
     color: rgb(var(--p-odd));
   }
   .Blue tr:nth-child(odd) td:nth-child(3n+1) {
     background-color: rgba(var(--bg-firstcol-odd), var(--tabl-opaq));
     color: rgb(var(--p-firstcol-odd));
   }
   .Blue tr:nth-child(even) td {
     background-color: rgba(var(--bg-even), var(--tabl-opaq));
     color: rgb(var(--p-even));
   }
   .Blue tr:nth-child(even) td:nth-child(3n+1) {
     background-color: rgba(var(--bg-firstcol-even), var(--tabl-opaq));
     color: rgb(var(--p-firstcol-even));
   }

 /* ---- PARAGRAPH COLORS ---- */
   .Blue tr:nth-child(odd) td p:not([class]) { color: rgb(var(--p-odd)); }
   .Blue tr:nth-child(odd) td:nth-child(3n+1) p:not([class]) { color: rgb(var(--p-firstcol-odd)); }
   .Blue tr:nth-child(even) td p:not([class]) { color: rgb(var(--p-even)); }
   .Blue tr:nth-child(even) td:nth-child(3n+1) p:not([class]) { color: rgb(var(--p-firstcol-even)); }

 /* ---- PARAGRAPH 1st LETTER ---- */
   .Blue tr:nth-child(odd) td p:not([class])::first-letter {
     color: rgb(var(--pfl-odd)); font-size: 2.0em;
   }
   .Blue tr:nth-child(odd) td:nth-child(3n+1) p:not([class])::first-letter {
     color: rgb(var(--pfl-firstcol-odd)); font-size: 2.4em;
   }
   .Blue tr:nth-child(even) td p:not([class])::first-letter {
     color: rgb(var(--pfl-even)); font-size: 2.0em;
   }
   .Blue tr:nth-child(even) td:nth-child(3n+1) p:not([class])::first-letter {
     color: rgb(var(--pfl-firstcol-even)); font-size: 2.4em;
   }


/* #############################################################################
   ===========================================================================
   AOC  (Ancient Other Civilizations -- BRAND-NEW CLASS)
   *** ALL selectors + ALL variables below are NEW ***
   *** STARTER PALETTE: neutral grey -- tune later ***
   ===========================================================================
   ############################################################################# */

 /* ---- geometry ---- */
   .AOC {
     height: auto;
     border-collapse: separate;
     border-spacing: 0.5rem;
     vertical-align: top;
     display: block;
   }
   .AOC th,
   .AOC td {
     padding: 1rem;
     text-align: center;
   }

 /* ---- TABLE + CELL BORDERS ---- */
   .AOC {
     border: 4px solid rgba(82,82,84, var(--tabl-opaq));   /* entire-table border */
   }
   .AOC th,
   .AOC td {
     border: 2px solid rgba(60,60,60, var(--tabl-opaq));   /* grey cell border */
   }

 /* ---- VARIABLES  (STARTER neutral greys) ---- */
   .AOC {
     background-color: rgba(120,120,120, var(--tabl-opaq));  /* interstitial */

     --bg-odd: 225,225,225;            /* light grey */
     --bg-firstcol-odd: 150,150,150;   /* mid grey   */

     --bg-even: 90,90,90;              /* dark grey  */
     --bg-firstcol-even: 60,60,60;     /* darker grey */

     --p-odd: 20,20,20;
     --p-firstcol-odd: 20,20,20;

     --p-even: 235,235,235;
     --p-firstcol-even: 235,235,235;

     --pfl-odd: 60,60,60;
     --pfl-firstcol-odd: 40,40,40;
     --pfl-even: 200,200,200;
     --pfl-firstcol-even: 220,220,220;
   }

 /* ---- BACKGROUND + BASE TEXT ---- */
   .AOC tr:nth-child(odd) td {
     background-color: rgba(var(--bg-odd), var(--tabl-opaq));
     color: rgb(var(--p-odd));
   }
   .AOC tr:nth-child(odd) td:nth-child(3n+1) {
     background-color: rgba(var(--bg-firstcol-odd), var(--tabl-opaq));
     color: rgb(var(--p-firstcol-odd));
   }
   .AOC tr:nth-child(even) td {
     background-color: rgba(var(--bg-even), var(--tabl-opaq));
     color: rgb(var(--p-even));
   }
   .AOC tr:nth-child(even) td:nth-child(3n+1) {
     background-color: rgba(var(--bg-firstcol-even), var(--tabl-opaq));
     color: rgb(var(--p-firstcol-even));
   }

 /* ---- PARAGRAPH COLORS ---- */
   .AOC tr:nth-child(odd) td p:not([class]) { color: rgb(var(--p-odd)); }
   .AOC tr:nth-child(odd) td:nth-child(3n+1) p:not([class]) { color: rgb(var(--p-firstcol-odd)); }
   .AOC tr:nth-child(even) td p:not([class]) { color: rgb(var(--p-even)); }
   .AOC tr:nth-child(even) td:nth-child(3n+1) p:not([class]) { color: rgb(var(--p-firstcol-even)); }

 /* ---- PARAGRAPH 1st LETTER ---- */
   .AOC tr:nth-child(odd) td p:not([class])::first-letter {
     color: rgb(var(--pfl-odd)); font-size: 2.0em;
   }
   .AOC tr:nth-child(odd) td:nth-child(3n+1) p:not([class])::first-letter {
     color: rgb(var(--pfl-firstcol-odd)); font-size: 2.4em;
   }
   .AOC tr:nth-child(even) td p:not([class])::first-letter {
     color: rgb(var(--pfl-even)); font-size: 2.0em;
   }
   .AOC tr:nth-child(even) td:nth-child(3n+1) p:not([class])::first-letter {
     color: rgb(var(--pfl-firstcol-even)); font-size: 2.4em;
   }
