h1 {font-size:1.2em}

/* Grammar productions */
div.gp { margin-left: 2.4em; margin-top: 0.9em; }
div.gp.prod { margin-left: 0; }  /* one-line production */
div.rhs { margin-left: 2.4em; margin-right: -10em; }  /* right-hand side */
div.pile { margin-left: 2.4em; max-width: 40em; }
div.keyword.pile code { float: left; width: 25%; }
div.keyword5.pile code { float: left; width: 20%; }
div.operator.pile code { float: left; width: 16%; }
div.end-pile { clear: both; }
sub.g-opt { color: #d1009e; /* sort of magenta */ }
sub.g-params { color: #49a08a; /* sort of aqua */ }

code { /* including code.t, meaning "terminal" or "token" */
    font-weight: bold;
    color: red;
}
span.nt {  /* nonterminal */
    font-family: Times New Roman, Times, FreeSerif, serif;
    font-style: italic;
color:green;
}
span.geq { font-weight: bold; }  /* grammar equal-sign, like "::" */
span.grhsmod {  /* right-hand side modifier, like "one of", "but not" */
    font-weight: bold;
    color: #555555;
}
span.grhsannot {   /* right-hand side annotation, like "[empty]" */
    font-family: Helvetica, Arial, Liberation Sans, sans-serif;
    font-size: smaller;
}
span.chgloss {  /* gloss for a character, like "asterisk" */
    font-style: italic;
}
span.gprose {
    font-family: Helvetica, Arial, Liberation Sans, sans-serif;
    font-size: 90%;
}

div.gsumxref {     /* grammar summary cross-reference, used in Annex A */
    width: 8em;
    float: right;
}

span.prod { margin-left: 5pt; margin-right: 5pt; }

div.rhs > code.t,
div.rhs > span.nt,
div.rhs > span.grhsannot,
div.rhs > span.grhsmod,
div.rhs > span.chgloss,
div.rhs > span.gprose,
div.rhs > var,
.prod > span.geq,
.prod > code.t,
.prod > span.nt,
.prod > span.grhsannot,
.prod > span.grhsmod,
.prod > span.chgloss,
.prod > span.gprose,
div.rhs > var {
    margin-left: 5pt;
}

div.rhs > code.t:first-child,
div.rhs > span.nt:first-child,
div.rhs > span.grhsannot:first-child,
div.rhs > span.grhsmod:first-child,
div.rhs > span.chgloss:first-child,
div.rhs > span.gprose:first-child,
div.rhs > var:first-child,
.prod > span.geq:first-child,
.prod > code.t:first-child,
.prod > span.nt:first-child,
.prod > span.grhsannot:first-child,
.prod > span.grhsmod:first-child,
.prod > span.chprose:first-child,
.prod > span.gprose:first-child,
.prod > var:first-child {
    margin-left: 0;
}

ul > li { list-style-type: disc; }
ul > li  > p { margin-bottom: 0.25em; margin-top: 0em; }


/* Procedures */
ol.proc {margin-top: 0.5em;}
ol.proc > li { list-style-type: decimal; }
ol.proc > li > ol.block > li { list-style-type: lower-latin; }
ol.proc > li > ol.block > li > ol.block > li
  { list-style-type: lower-roman; }
ol.proc > li > ol.block > li > ol.block > li >
  ol.block > li { list-style-type: decimal; }
ol.proc > li > ol.block > li > ol.block > li >
  ol.block > li > ol.block > li { list-style-type: lower-latin; }
ol.proc > li > ol.block > li > ol.block > li >
  ol.block > li > ol.block > li > ol.block > li
  { list-style-type: lower-roman; }
  
/* special indents for replacement steps*/
p.special1 { padding-left: +3em; ;text-indent: -1em; }
p.special2 { padding-left: +11em; ;text-indent: -1em; }
p.special3 { padding-left: +6em; ;text-indent: -1em; }
p.special4 { padding-left: +3em; ;text-indent: -1em; }
