/* THE SHEET'S OWN ADJUSTMENTS, kept out of headlib.php -- Tom, 2026-09-18: "i really dont want
   those library files modified". Every one of these is a rule about how the sheet looks, so it
   belongs here, and each is one line to change or delete.

   1. The voiced letter sits too low in its box: it rises 15 (Tom, 2026-09-17, "they all"). Only
      in boxes with a diagonal, so the single-letter [h] box, which he placed himself, is left
      alone. */
/* WITHDRAWN 2026-09-19. This raised the voiced letter 15, which Tom asked for on 09-17 when it
   sat too low. Three things it did that he then caught by eye:
     - it moved the letter but not the number: a CSS transform is invisible to getBBox, so every
       measurement I made of an upper letter was 15 units out, and I reported wrong numbers twice;
     - it carries the letter's CLIP with it. The clip is the box's own diagonal, applied in the
       letter's space and then moved by the transform, so the cutting line ended up 15 above the
       diagonal you see. "the diagonal clip is wrong" -- it was;
     - his cell-font constraint of 09-19 says exactly where the upper bracket goes, 2 below the
       box top, which is the same instruction stated properly. A blanket raise cannot serve it.
   Where the letter sits is now set per box, in read/inc_C.php, where the size is set too. */

   RESTORED THE SAME DAY, for the boxes that still need it. Withdrawing it everywhere made the
   letter sheet print SHORT -- 34 lines of text against 45 -- and make_pdf.py refused to publish
   it. Fewer lines means glyphs touching: in the seven boxes whose letters are still placed the
   old way, the raise is what keeps the upper letter off the lower one, which is the very thing
   Tom asked it for on 09-17. So it stays for those, and is off only where the letters are
   placed to the cell-font constraint box by box -- the five fricative boxes. As each of the
   seven gets its own numbers, it drops out of here too, and when none is left this rule goes. */
svg.bgimg:has(path[id^="diag_"]) text:first-of-type {
    transform: translateY(-15px);
}

/* 2. The five narrow fricative boxes. The box is drawn at 95% of its own width, which leaves a
      gap between neighbours that should sit edge to edge.

      The clip is BACK. It was switched off here on 2026-09-18, when the letters were sized to
      keep apart and the steep diagonal of a narrow box was cutting the lower letter's top.
      Tom settled it on 2026-09-19, in the rule he named the cell-font constraint: a bracket's
      corner MAY be hidden by the cell's diagonal, and what clips it must be that box's actual
      diagonal, not one left from a different box shape. The polygons headlib.php writes are
      the actual ones -- 0,0 to 112.56,0 to 0,198 for these boxes -- so switching the clip off
      was hiding a correct cut, and the letters now fill their halves instead of avoiding it. */

/* THE ASTERISK THAT SAYS A BOX STANDS FOR TWO PLACES -- Tom, 2026-09-19. It sends from the two
   cut cells in the consonant chart and is received by the table of four places at the foot of
   that page. It sits over the box's upper right, and its white ground hides the diagonal slash
   beneath it, which is what he asked for. */
/* the mark is placed against the BOX, so this has to wrap the box and nothing else --
   with the letter styles inherited it was wider than the box and the mark landed at the
   upper LEFT instead of on the diagonal (Tom, 2026-09-19). */
.cutmark { position: relative; display: inline-block; line-height: 0; font-size: 0; }
/* ON the diagonal, in the upper-right quarter of the box -- Tom, 2026-09-19: "not inside the
   top edge line of the box, rather on top of the diagonal cut line in the upper-right quadrant.
   Then it applies to the whole box; both letters." The diagonal runs corner to corner, so the
   middle of the upper-right quarter sits on it. The white ground hides the slash beneath. */
.cutmark .ast {
    position: absolute; top: 22%; left: 72%;
    transform: translate(-50%, -50%);
    font-size: 34px; line-height: 1; font-weight: bold;
    background: #fff; padding: 0 0.06em; border-radius: 0.2em;
}
.ast.recv { font-size: 3em; font-weight: bold; line-height: 1; }
table.fricplaces { margin: 0.25in auto 0; }
table.fricplaces td { padding: 0; text-align: center; vertical-align: middle; }

/* Tom, 2026-09-20, reading the preview: "the whole bonus row, shift it right 30px. And the
   left-most cell contents, move them within the row to the right by 15px." Two separate moves:
   the strip as a whole, then its first cell's contents on top of that, so the asterisk and the
   manner glyph land 45 right of where they were while the four heads move only 30.
   position/left, not margin: the table is centred with margin auto and a margin change would
   fight the centring; left moves what is drawn without touching the layout box. */
table.fricplaces { position: relative; left: 30px; }
table.fricplaces tr > td:first-child > * { position: relative; left: 15px; }

/* 2026-09-23: a rule that bordered EVERY cell of #consonant-table lived here for a few hours.
   It drew boxes around the corner head, the nasal glyph, the manner glyphs and an empty cell,
   and doubled the letter boxes. The bonus row was spared only because it is table.fricplaces.
   The cut box draws its own border (headlib.php voicebox, the <rect>). Cells draw none. */

/* THE FULL 5px OF EVERY CUT BOX'S OWN BORDER (Tom, 2026-09-23: the voice cut boxes have
   half-thickness borders). voicebox() draws the border as a <rect> on the very edge of the
   box's canvas, and a stroke sits centred on its line, so half of a 5px stroke falls outside
   the canvas. An inline SVG clips there by default, so only 2.5px showed. Letting the box
   overflow shows all 5. Where two boxes touch, both strokes fall in the SAME 5px band on the
   shared wall, so a seam reads as one line, not two. The class comes from headlib.php. */
svg.cutbox { overflow: visible; }

/* THE CONSONANT LETTERS SIT LOW IN THEIR ROWS (Tom, 2026-09-23: shift all the consonant
   bracketed letters vertically to be centred within their row; the downshift is about 15px).
   printable.css line 27 gives .myfonts.voiced  bottom: -10px  on a relatively positioned div,
   which pushes every letter DOWN 10px. That file is shared with the live sheet, so it is
   overridden here for the consonant table only. The rest of the miss is measured, not guessed:
   see the ink-centre numbers on record cell-font-constraint. */
#consonant-table div.myfonts.voiced { bottom: 0; }

/* THE VOWEL LETTERS TOO (Tom, 2026-09-23: do the same vertical centring for the vowel letters).
   Same cause, printable.css line 27, bottom: -10px on .myfonts.voiced. The vowel table had no
   name; it is #vowel-table now (inc_V.php) so this reaches only it. */
#vowel-table div.myfonts.voiced { bottom: 0; }

/* PRINT: THE VOWEL HEADS ARE ALREADY FULL SIZE (Tom, 2026-09-24: "upon attempting a paper print
   this produces giant heads for the vowels"). printable.css line 132 (Tom, 2026-09-21) scales
   img.head.v by 1.8 and shifts it 30px right IN PRINT ONLY, written when those heads were small
   120px images. This week the heads themselves went to 184px on screen, so on paper both
   enlargements stacked: 184 x 1.8 in a cell 78px wide. Measured under print media: head 139px,
   cell 78px. The screen size is the intended size, so print draws them as screen does. */
@media print {
  div.page.placep1 img.head.v { transform: none; }
  /* THE LETTERS TOO (Tom, 2026-09-24: print version fonts come out too big, cutting off parts
     of the letters). printable.css gives .myfonts.voiced a print-only font-size of 10em, which
     computes to 160px against the screen's 128px -- 1.25x -- while the rows are sized for the
     screen letters. Measured under print media: text 106px tall in a 90px cell. The screen
     size is the intended size; print draws the letters as screen does and the page zoom scales
     everything together. */
  #vowel-table div.myfonts.voiced, #consonant-table div.myfonts.voiced { font-size: 128px; }
}
