/*
 * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

@import url('.fonts/dejavu.css');

HTML, BODY, DIV, SPAN, APPLET, OBJECT, IFRAME, H1, H2, H3, H4, H5, H6, P,
BLOCKQUOTE, PRE, A, ABBR, ACRONYM, ADDRESS, BIG, CITE, CODE, DEL, DFN, EM,
IMG, INS, KBD, Q, S, SAMP, SMALL, STRIKE, STRONG, SUB, SUP, TT, VAR, B, U,
I, CENTER, DL, DT, DD, OL, UL, LI, FIELDSET, FORM, LABEL, LEGEND, TABLE,
CAPTION, TBODY, TFOOT, THEAD, TR, TH, TD, ARTICLE, ASIDE, CANVAS, DETAILS,
EMBED, FIGURE, FIGCAPTION, FOOTER, HEADER, HGROUP, MENU, NAV, OUTPUT, RUBY,
SECTION, SUMMARY, TIME, MARK, AUDIO, VIDEO {
  margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit;
  vertical-align: baseline; }
ARTICLE, ASIDE, DETAILS, FIGCAPTION, FIGURE, 
FOOTER, HEADER, HGROUP, MENU, NAV, SECTION { display: block; }
BLOCKQUOTE, Q { quotes: none; }
BLOCKQUOTE:before, BLOCKQUOTE:after, Q:before, Q:after {
        content: ''; content: none; }
TABLE { border-collapse: collapse; border-spacing: 0; }

A { text-decoration: none; }
A:link, TABLE.toc A:visited { color: #437291; }
A:visited { color: #666666; }
A.anchor:link, A.anchor:visited { color: inherit; }
A[href]:hover { color: #e76f00; }
A IMG { border-width: 0px; }

HTML { font-size: 24px; }       /* Grid */
HTML > BODY { font-size: 16px; }
BODY {
  background: white;
  margin-top: -4px; margin-left: 4px; /* Grid tweaks */
  margin-bottom: calc(100vh - 8rem);
  /* 6.7vw = 48px = 2rem at 716px width */
  padding: clamp(1rem, 6.7vw, 2rem) clamp(.25rem, 6.7vw, 2rem);

  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  text-align: justify;

  max-width: 660px;
  line-height: 1rem;
  -webkit-text-size-adjust: 100%; /* iOS */
  color: #222;
}

/* BODY { background: url("grid-12.png") repeat 0 12px; } /**/

FOOTER.legal { font-size: 12px; line-height: 16px; color: #888;
               text-align: center; margin-top: 4rem; }
FOOTER.legal A { color: #888; }

H1, H2, H3, H4 { text-align: left; }

BODY { font-family: "DejaVu Serif", "Bitstream Vera Serif", Georgia, serif; }
CODE, TT, FOOTER.legal { font-family: "DejaVu Sans", "Bitstream Vera Sans",
                         "Verdana", Helvetica, sans-serif; }
PRE, PRE > CODE { font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono",
                  Monaco, "Courier New", monospace; }

I, EM { font-style: italic; }
I I, EM EM { font-style: normal; }
B, STRONG, TH { font-weight: bold; }

P + P { text-indent: clamp(1rem, 6.7vw, 2rem); }
P.br { text-indent: 0; margin-top: .5rem; }
LI { margin-top: 0; margin-bottom: 0; }
LI LI { margin-right: 0; text-align: left; }

UL, OL { margin: .5rem 0;
         padding-left: clamp(1rem, 6.7vw, 2rem);
         padding-right: clamp(.5rem, 3.35vw, 1rem); }
UL UL, UL OL, OL OL, OL UL { margin-top: 0; margin-bottom: 0; }
LI > P:first-child { margin-top: .5rem; }
LI > P:last-child { margin-bottom: .5rem; }

PRE, TABLE, FIGURE
  { padding: 0; margin-left: clamp(1rem, 6.7vw, 2rem); margin-right: 0
    overflow: visible; width: max-content; }
PRE { margin-top: .5rem; margin-bottom: .5rem; }
TABLE, FIGURE { margin-top: 1rem; margin-bottom: 1rem; }
BLOCKQUOTE { margin: .5rem clamp(1rem, 6.7vw, 2rem); }
/*LI BLOCKQUOTE { margin-left: 0; margin-right: 0; }*/
UL LI { list-style-type: square; }

DL { margin-top: .5rem; }
DD { margin-left: clamp(1rem, 6.7vw, 2rem); }

H1, H2, H3, H4, DIV.subtitle, DIV.author, DIV.date { font-weight: bold; }

H1 { font-size: 20px; }
H2, DIV.subtitle { font-size: 18px; }

H1 { margin: 1rem 0 1rem; }
H1:first-child { margin-top: 0; }

H2 { margin: 1rem 0 .5rem; }

H1 + DIV.author, H1 + DIV.date { margin-top: -.5rem; }

DIV.subtitle { margin: -1rem 0 .5rem; font-style: italic; }

DIV.author, DIV.date { margin: .5rem 0 1rem; }
DIV.author + DIV.date { margin: -1rem 0 1rem; }

H3, H4 { margin-top: .5rem; margin-bottom: .5rem; }
H3 { font-style: italic; }

H1, H2, DIV, BODY > P, BODY > UL, BODY > OL { margin-left: 0px; }

TABLE TD, TABLE TH { padding-left: 1em; padding-top: .5em; text-align: left; }
TABLE TD:first-child, TABLE TH:first-child { padding-left: 0; }
TABLE TH { padding-top: 0; }

NAV.toc { margin-bottom: 1rem; }
NAV.toc LI { list-style-type: none; }
NAV.toc > UL > LI { margin: .25rem 0; }
NAV.toc LI UL { text-align: left; font-size: 14px; line-height: 20px;
                padding-left: 1rem; margin: .25rem 0; }
NAV.toc LI UL LI { display: inline; }
NAV.toc LI UL LI::after { content: "\a0· "; }
NAV.toc LI UL LI:last-child::after { content: ""; }
