
@font-face
{
    font-family: helv;
    src: url(fonts/helv.woff2) format("woff2");
    font-display: swap;
}
@font-face
{
    font-family: helv;
    font-style: italic;
    src: url(fonts/helv-italic.woff2) format("woff2");
    font-display: swap;
}
@font-face
{
    font-family: helv;
    font-weight: bold;
    src: url(fonts/helv-bold.woff2) format("woff2");
    font-display: swap;
}
@font-face
{
    font-family: slid;
    src: url(fonts/slider.woff2) format("woff2");
    font-display: swap;
}
@font-face
{
    font-family: lazax;
    src: url(fonts/lazax.woff2) format("woff2");
    font-display: swap;
}

html, body
{
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: helv, Arial, sans-serif;
    height: 100%;
}
body
{
  display: flex;
  flex-direction: column;
}
header
{
    padding: 1em;
    text-align: center;
    background-color: #000088;
    color: white;
    font-family: slid, Futura, sans-serif;
    font-size: 400%;
    font-weight: normal;
    flex: none;
    font-variant:small-caps;
    position: relative;
}
a
{
    color: var(--fg);
}
article
{
    padding: 2em 6em;
    flex: 1 0 auto;
}
header h1
{
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
}
article > h1, article > h2
{
    margin: 0;
    padding-top: 1ex;
    padding-bottom: 1.25ex;
    font-family: slid, Futura, sans-serif;
    font-size: 250%;
    font-weight: normal;
}
article h2
{
    font-family: slid, Futura, sans-serif;
    font-size: 150%;
    font-weight: normal;
    margin: 0;
}
/* Card headings link to the wiki; no underline unless hovered */
article h2 a
{
    text-decoration: none;
}
article h2 a:hover
{
    text-decoration: underline;
}
/* Home page section headings: h2 for one-h1-per-page, sized like article > h1 */
article > h2.section
{
    font-size: 250%;
}
sub
{
    font-size: 50%;
    vertical-align: baseline;
}
sup
{
    line-height: 0;
}
sc
{
    font-variant: small-caps;
}
li
{
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
    line-height: 1.2;
    padding-bottom: 1ex;
    orphans: 3;
    widows: 3;
}
ol, ul
{
    margin: 0;
}
p
{
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
    line-height: 1.2;
    padding-bottom: 1ex;
    padding-top: 1ex;
    margin: 0;
    orphans: 3;
    widows: 3;
}
h2 + p, p + p, li + p
{
    padding-top: 0;
}
.lrr
{
    counter-reset: item;
    list-style-type: none;
}
.lrr > li:before
{
    counter-increment: item;
}
.lrr > h2 > li:before
{
    counter-increment: item;
}
.lrr > ol
{
    counter-reset: subitem;
    list-style-type: none;
}
.lrr > ol > li:before
{
    content: counter(subitem, lower-alpha);
    counter-increment: subitem;
}
.lrr > .roman > li:before
{
    content: counter(subitem, lower-roman);
    counter-increment: subitem;
}
.note
{
    list-style-type: none;
    counter-reset: nitem;
}
/* Each list is its own column container. Columns used to be on <article> with
   spanning headings, which Safari mis-balances (text clipped at column bottoms). */
.note, .lrr, article > ul
{
    column-width: 21em;
    column-gap: 6em;
}
/* Never split one rule or note across columns. Safari ignores break-inside on
   these items and clips the line it breaks on, but never splits an inline-block. */
.note li, .lrr li
{
    display: inline-block;
    width: 100%;
    vertical-align: top;
}
.note > li:before
{
    content: counter(nitem, upper-roman);
    counter-increment: nitem;
}
.note > ol
{
    counter-reset: subitem;
    list-style-type: none;
}
.note > ol > li:before
{
    content: counter(subitem, lower-greek);
    counter-increment: subitem;
}
.lrr, .note
{
    padding-left: 3em;
}
.lrr > li:before, .lrr > h2 > li:before, .note > li:before
{
    width: 3em;
    text-align: left;
    display: inline-block;
    margin-left: -3em;
    left: 0;
    font-weight: normal;
}
.lrr > h2 > li:before
{
    font-size: 66.67%;
    vertical-align: baseline;
    font-family: helv, Arial, sans-serif;
}
.lrr > ol, .note > ol
{
    padding-left: 2em;
}
.lrr > ol > li:before, .note > ol > li:before
{
    width: 2em;
    text-align: left;
    display: inline-block;
    margin-left: -2em;
    left: 0;
}
footer
{
    padding: 5em;
    text-align: center;
    font-size: 80%;
    background-color: #000088;
    color: white;
    line-height: 1.2;
    flex: none;
}
footer > p, footer > p + footer > p
{
    padding-bottom: 1ex;
}
footer a
{
    color: white;
}
header, footer
{
    background-image: url("beta_tile.png");
    background-repeat: repeat;
    background-attachment: fixed;
    /* was PHP-generated random offset; style.css is served as a static file so it never ran */
    background-position: 0% 0%;
    background-size: calc(1196px * 0.05) calc(480px * 0.05);
}
/* Dark mode follows the OS setting unless the header toggle sets data-theme;
   header and footer keep their image backgrounds */
:root
{
    --bg: white;
    --fg: black;
    --removed: #b00000;
    color-scheme: light;
}
:root[data-theme="dark"]
{
    --bg: #121218;
    --fg: #e4e4e4;
    --removed: #ff6b6b;
    color-scheme: dark;
}
@media (prefers-color-scheme: dark)
{
    :root:not([data-theme="light"])
    {
        --bg: #121218;
        --fg: #e4e4e4;
        --removed: #ff6b6b;
        color-scheme: dark;
    }
}
/* Components removed from the game (e.g. base-game agendas dropped by Prophecy of Kings) */
.removed, .removed a
{
    color: var(--removed);
}
body
{
    background-color: var(--bg);
    color: var(--fg);
}
.theme-toggle
{
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.2em 0.4em;
    font-size: 1.25rem;
    line-height: 1;
    color: white;
    background: none;
    border: 1px solid white;
    border-radius: 0.3em;
    cursor: pointer;
}
/* Bug-shaped "report a problem" link, mirroring the theme toggle on the left */
.report-button
{
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.2em 0.4em;
    font-size: 1.25rem;
    line-height: 1;
    color: white;
    border: 1px solid white;
    border-radius: 0.3em;
}
.report-button svg
{
    display: block;
    width: 1em;
    height: 1em;
}
/* Home page button that switches to the lite site (lite.tirules2.com) and back */
form.lite-switch button
{
    margin-right: 0.5em;
    padding: 0.2em 1em;
    font: inherit;
    cursor: pointer;
}
/* Report form (/report) */
form.report label
{
    display: block;
    margin-top: 1.5ex;
    font-weight: bold;
}
form.report input[type="text"], form.report select, form.report textarea
{
    box-sizing: border-box;
    width: 100%;
    padding: 0.3em;
    font: inherit;
    color: var(--fg);
    background: var(--bg);
    border: 1px solid var(--fg);
}
form.report textarea
{
    min-height: 10em;
}
form.report button
{
    margin-top: 2ex;
    padding: 0.3em 1em;
    font: inherit;
    cursor: pointer;
}
/* Home page: large search button under the title */
p.search-link
{
    text-align: center;
    padding: 0 0 2ex;
}
p.search-link a
{
    display: inline-block;
    padding: 0.4em 1.5em;
    font-family: slid, Futura, sans-serif;
    font-size: 200%;
    font-variant: small-caps;
    text-decoration: none;
    color: white;
    background-color: #000088;
    border-radius: 0.3em;
}
p.search-link a:hover
{
    text-decoration: underline;
}
/* Search page (/search) */
form.search label
{
    display: block;
    margin-bottom: 1ex;
    font-weight: bold;
}
form.search input[type="search"]
{
    box-sizing: border-box;
    width: 30em;
    max-width: 70%;
    padding: 0.3em;
    font: inherit;
    color: var(--fg);
    background: var(--bg);
    border: 1px solid var(--fg);
}
form.search button
{
    padding: 0.3em 1em;
    font: inherit;
    cursor: pointer;
}
form.search + p
{
    padding-top: 2ex;
}
.search-results
{
    padding-bottom: 1ex;
}
.search-results a
{
    text-decoration: none;
}
.search-results a:hover
{
    text-decoration: underline;
}
.search-where
{
    font-size: 80%;
    opacity: 0.8;
}
mark
{
    color: black;
    background-color: #ffe066;
}
.report-trap
{
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.report-error
{
    color: var(--removed);
}
@media screen and (max-width: 600px)
{
    header
    {
        /* side padding keeps long titles clear of the theme toggle */
        padding: 0.4em 2.75rem;
        font-size: 320%;
    }
    article
    {
        padding: 0.8em 2.4em;
    }
    .note, .lrr, article > ul
    {
        column-gap: 2.4em;
    }
    article > h1, article > h2
    {
        font-size: 200%;
    }
    article h2
    {
        font-size: 120%;
    }
    article > h2.section
    {
        font-size: 200%;
    }
    .lrr > h2 > li:before
    {
        font-size: 83.33%;
    }
    footer
    {
        padding: 2em;
    }
}

li.ixth
{
    font-family: lazax;
}
li.ixth:before
{
    font-family: helv, Arial, sans-serif;
}
.report-reason
{
    font-size: 80%;
    opacity: 0.8;
}
