:root {
    --font-family: 'Open Sans', 'Segoe UI', system-ui, -apple-system, 'BlinkMacSystemFont', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    --main-width: min(1100px, min(93%, calc(100% - 32px)));
    --gutter-width: calc((100vw - var(--main-width)) / 2);

    --table-border-radius: 8px;

    font-family: var(--font-family);
    font-size: 12pt;
}

html, body {
    overflow-x: clip;
}
body {
    overflow-y: auto;
}
html {
    overflow-y: scroll;
}


body {
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

#main-article {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

#main-article-content {
    margin: 0 auto;
    width: var(--main-width);
    min-height: 100vh;
}

header {
    padding: 65px 0 0;
    margin-bottom: 1em;
}

#main-article header {
    position: relative;
    /* left: calc(-50vw + 50%); */
    width: 100%;
}

#header-bar {
    padding: 1.5em calc((100% - var(--main-width)) / 2);
    width: 100%;
    max-width: 100%;
    /* background-color: rgb(240, 240, 240); */
    border-top: 1.5px solid rgb(235, 235, 235);
    margin: 5em 0 0;
    box-sizing: border-box;
    position: relative;
    /* left: calc(-50vw + 50%); */
}

#main-article header h1 {
    font-size: 60pt;
    width: fit-content;
    margin: 0 auto;
    border-bottom: 12px solid var(--brand-color);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
}

a {
    color: #0064e6;
    text-decoration: none;
}
a:hover {
    color: #1078ff;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}
a.internal.resolved {
    color: #e66a0b;
}
a.internal.resolved:hover {
    color: #ff7810;
}
a.internal.unresolved {
    color: #e60000;
}
a.internal.unresolved:hover {
    color: #e60000;
    text-decoration: wavy underline;
    text-decoration-thickness: 0.75px;
}

pre {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 100, 100, 0.3) rgba(0,0,0,0);
}

div.table {
    width: 95vw;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(128, 128, 128, 0.5) rgba(0,0,0,0);
    margin: 2rem 0;
    position: relative;
    left: calc(-47.5vw + 50%);
}

table {
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 auto;
    width: max-content;
}

thead, tfoot {
    position: relative;
}

thead tr:last-child th {
    border-bottom: 2px solid rgb(175, 175, 175);
}

tfoot tr:first-child td {
    border-top: 2px solid rgb(175, 175, 175);
}

tr td, tr th {
    border-bottom: 1px solid rgb(225, 225, 225);
}
tr td:last-child, tr th:last-child {
    border-right: 1px solid rgb(225, 225, 225);
}
tbody:not(:last-child) > tr:last-child > td {
    border-bottom: none;
}
tbody tr:hover {
    background-color: rgba(246, 246, 246);
}
thead::after, thead::before {
    content: "";
    width: 1px;
    height: 2px;
    position: absolute;
    top: calc(100% - 2px);
    background-color: rgb(175, 175, 175);
}
tfoot::after, tfoot::before {
    content: "";
    width: 1px;
    height: 2px;
    position: absolute;
    top: 0;
    background-color: rgb(175, 175, 175);
}
thead::after, tfoot::after {
    right: 0;
}

th, td {
    --left-pad: 0.5em;
    --right-pad: calc(min(2em, max(0.5em, 0.5em + (100vw - 600px) * 0.015)));
    padding: 0.5em var(--right-pad) 0.5em var(--left-pad);
    max-width: 60ch;
    text-align: left;
}
th, tfoot td {
    background-color: rgba(240, 240, 240);
}

td.left, th.left {
    text-align: left;
}
td.right, th.right {
    text-align: right;
    --right-pad: 0.5em;
    --left-pad: calc(min(2em, max(0.5em, 0.5em + (100vw - 600px) * 0.015)));
}
td.center, th.center {
    text-align: center;
    --left-pad: calc(min(1em, max(0.25em, 0.25em + (100vw - 600px) * 0.0075)));
    --right-pad: calc(min(1em, max(0.25em, 0.25em + (100vw - 600px) * 0.0075)));
}

tr th:first-child, tr td:first-child {
    padding-left: 0.75em;
}
tr th:last-child, tr td:last-child {
    padding-right: 0.75em;
}

table tr th:first-child,
table tr td:first-child {
  border-left: 1px solid rgb(225, 225, 225);
}
table tr th {
  border-top: 1px solid rgb(225, 225, 225);
}

/* top-left border-radius */
table > :nth-child(2) tr:first-child th:first-child,
table > :nth-child(2) tr:first-child td:first-child {
    border-top-left-radius: var(--table-border-radius);
}

/* top-right border-radius */
table > :nth-child(2) tr:first-child th:last-child,
table > :nth-child(2) tr:first-child td:last-child {
    border-top-right-radius: var(--table-border-radius);
}

/* bottom-left border-radius */
table > :last-child tr:last-child td:first-child {
    border-bottom-left-radius: var(--table-border-radius);
}

/* bottom-right border-radius */
table > :last-child tr:last-child td:last-child {
    border-bottom-right-radius: var(--table-border-radius);
}


q.single::before {
    content: "\2018";
}
q.single::after {
    content: "\2019";
}

dfn {
    font-style: normal;
    font-weight: bold;
}

s, u, ins, del {
    text-decoration-thickness: 1px;
}


.linguistics.ipa, .literal {
    font-size: 12.5pt;
    font-family: 'Gentium Plus', 'Charis SIL', 'Doulos SIL', 'Andika', 'Times New Roman', Times, Arial, 'Segoe UI', 'Segoe UI Symbol', serif, sans-serif;
}
.linguistics.ipa.phonetic::before {
    content: "[";
}
.linguistics.ipa.phonetic::after {
    content: "]";
}
.linguistics.ipa.phonemic::before {
    content: "/";
    font-weight: bold;
}
.linguistics.ipa.phonemic::after {
    content: "/";
    font-weight: bold;
}
.linguistics.ipa.graphemic::before {
    content: "\2329";
}
.linguistics.ipa.graphemic::after {
    content: "\232A";
}
.linguistics.ipa.precise-phonetic::before {
    content: "\27E6";
}
.linguistics.ipa.precise-phonetic::after {
    content: "\27E7";
}
.linguistics.ipa.morphophonemic::before {
    content: "\2AFD";
}
.linguistics.ipa.morphophonemic::after {
    content: "\2AFD";
}
.linguistics.linguistics.respelling::before {
    content: "(";
}
.linguistics.respelling::after {
    content: ")";
}

ul, ol {
    padding-left: 0;
}
li > p {
    margin: 0;
}
li {
    margin: 1em 0;
    margin-inline-start: 40px;
}


li.task {
    margin: 1em 0;
    position: relative;
}
li.task .task-check {
    display: inline-flex;
    align-items: center;
    flex-direction: row;
    white-space-collapse: collapse;
    height: 22px;
    position: absolute;
    top: 1.5px;
    left: -22px
}
li.task::marker {
    display: none;
    content: none;
}
li.task > p {
    display: inline;
}
li.task input.task-checkbox {
    display: inline;
    margin: 0 3px;
    opacity: 0;
    pointer-events: all;
}
li.task .checkmark {
    position: absolute;
    display: inline;
    left: 3px;
    height: 12px;
    width: 12px;
    background-color: rgba(0,0,0,0);
    pointer-events: none;
    align-self: center;
    border-radius: 2px;
    border: 1px solid gray;
}
li.task > span.task-check > input.task-checkbox[checked="checked"] + .checkmark {
    background-color: #0064e6;
    border-color: #0853b6;
}
li.task > span.task-check > input.task-checkbox[checked="checked"] + .checkmark::before {
    color: white;
    content: url("data:image/svg+xml; utf8, <svg width=\"10px\" height=\"10px\" viewBox=\"0 0 12 8\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><g transform=\"translate(-4.000000, -6.000000)\" fill=\"white\"><path d=\"M8.1043257,14.0367999 L4.52468714,10.5420499 C4.32525014,10.3497722 4.32525014,10.0368095 4.52468714,9.8424863 L5.24777413,9.1439454 C5.44721114,8.95166768 5.77142411,8.95166768 5.97086112,9.1439454 L8.46638057,11.5903727 L14.0291389,6.1442083 C14.2285759,5.95193057 14.5527889,5.95193057 14.7522259,6.1442083 L15.4753129,6.84377194 C15.6747499,7.03604967 15.6747499,7.35003511 15.4753129,7.54129009 L8.82741268,14.0367999 C8.62797568,14.2290777 8.3037627,14.2290777 8.1043257,14.0367999\"></path></g></g></svg>");
    height: 12px;
    width: 12px;
    display: inline-block;
    position: relative;
    top: -7px;
    left: 0;
    text-align: center;
    pointer-events: none;
    font-size: 10pt;
}
li.task[data-task="!"] > span.task-check > input.task-checkbox[checked="checked"] + .checkmark {
    background-color: #cb0000;
    border-color: #9c0a0a;
}
li.task[data-task="!"] > span.task-check > input.task-checkbox[checked="checked"] + .checkmark::before {
    left: 0;
    top: -7.5px;
    content: "!";
    font-weight: 900;
}
li.task[data-task="?"] > span.task-check > input.task-checkbox[checked="checked"] + .checkmark {
    background-color: #9100cb;
    border-color: #770ca1;
}
li.task[data-task="?"] > span.task-check > input.task-checkbox[checked="checked"] + .checkmark::before {
    left: 0;
    top: -7.25px;
    content: "?";
    font-weight: 900;
}
li.task[data-task="~"] > span.task-check > input.task-checkbox[checked="checked"] + .checkmark {
    background-color: #cbad00;
    border-color: #a1830c;
}
li.task[data-task="~"] > span.task-check > input.task-checkbox[checked="checked"] + .checkmark::before {
    left: 0;
    top: -7.25px;
    content: "~";
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 900;
}
li.task[data-task="-"] > span.task-check > input.task-checkbox[checked="checked"] + .checkmark {
    background-color: #cb5b00;
    border-color: #a1390c;
}
li.task[data-task="-"] > span.task-check > input.task-checkbox[checked="checked"] + .checkmark::before {
    left: 0;
    top: -8.5px;
    content: "–";
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 900;
}

ul.tight > li, ol.tight > li {
    margin: 0.2em 0;
    margin-inline-start: 40px;
}


.spoiler {
    position: relative;
    transition: background-color 0.5s ease;
}
.spoiler::after {
    z-index: 1000;
    content: '';
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    background-color: rgba(0,0,0,0);
    position: absolute;
    left: -2px;
    top: -2px;
    border-radius: 2px;
    transition: background-color 1s ease;
}
.spoiler.hidden::after {
    background-color: #101010;
    font-size: small;
    color: black;
    text-align: center;
    line-height: 1.75;
    transition: color 15s ease;
}
.spoiler.hidden:hover::after {
    cursor: pointer;
    color: white;
    content: "Reveal Spoiler";
    background-color: #202020;
}

ins {
    color: #0f9615
}
del {
    color: #9c0a0a
}

blockquote {
    border-left: 3px solid #d0d0d0;
    padding-left: 1em;
}

.smallcaps {
    font-variant-caps: small-caps;
}

.colored {
    --color: red;
    color: var(--color);
}

.colored.success {
    --color: #0f9615;
}

.colored.glow {
    --color: yellow;
    color: revert;
    text-shadow: var(--color) 0 0 8px;
}

.colored.rainbow {
    color: transparent;
    background: linear-gradient(
        90deg,
        rgba(255, 0, 0, 1) 0%,
        rgba(255, 154, 0, 1) 10%,
        rgba(208, 222, 33, 1) 20%,
        rgba(79, 220, 74, 1) 30%,
        rgba(63, 218, 216, 1) 40%,
        rgba(47, 201, 226, 1) 50%,
        rgba(28, 127, 238, 1) 60%,
        rgba(95, 21, 242, 1) 70%,
        rgba(186, 12, 248, 1) 80%,
        rgba(251, 7, 217, 1) 90%,
        rgba(255, 0, 0, 1) 100%
    );;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

mark {
    --bg-color: yellow;
    background-color: var(--bg-color);
}

mark.success {
    --bg-color: #0f9615;
}

mark.rainbow {
    background: linear-gradient(
        90deg,
        rgba(255, 0, 0, 1) 0%,
        rgba(255, 154, 0, 1) 10%,
        rgba(208, 222, 33, 1) 20%,
        rgba(79, 220, 74, 1) 30%,
        rgba(63, 218, 216, 1) 40%,
        rgba(47, 201, 226, 1) 50%,
        rgba(28, 127, 238, 1) 60%,
        rgba(95, 21, 242, 1) 70%,
        rgba(186, 12, 248, 1) 80%,
        rgba(251, 7, 217, 1) 90%,
        rgba(255, 0, 0, 1) 100%
    );;
}
mark.rainbow-rev {
    background: linear-gradient(
        -90deg,
        rgba(255, 0, 0, 1) 0%,
        rgba(255, 154, 0, 1) 10%,
        rgba(208, 222, 33, 1) 20%,
        rgba(79, 220, 74, 1) 30%,
        rgba(63, 218, 216, 1) 40%,
        rgba(47, 201, 226, 1) 50%,
        rgba(28, 127, 238, 1) 60%,
        rgba(95, 21, 242, 1) 70%,
        rgba(186, 12, 248, 1) 80%,
        rgba(251, 7, 217, 1) 90%,
        rgba(255, 0, 0, 1) 100%
    );;
}


a.tag {
    background-color: rgba(255, 152, 78, 0.5);
    color: rgb(184, 77, 0);
    border-radius: 24pt;
    padding: 2px 6px;
    font-size: small;
    position: relative;
    top: -1px;
}
a.tag::before {
    content: "#";
}
a.tag:hover {
    /* background-color: rgba(255, 152, 78, 0.75); */
    filter: brightness(0.9) saturate(1.1);
}
/* .tag-count::before {
    content: "(";
} */
/* .tag-count::after {
    content: ")";
} */

a.tag.ordisian {
    background-color: rgba(255, 125, 125, 0.75);
    color: rgb(184, 0, 0);
}

a.tag.people {
    background-color: rgba(255, 234, 78, 0.75);
    color: rgb(160, 123, 0);
}

hr {
    border: none;
    height: 2px;
    border-radius: 4px;
    background-color: #d8d8d8;
}

.big {
    font-size: large;
}
.huge {
    font-size: x-large;
}
.hero {
    font-size: xx-large;
}


@keyframes flash {
    0% { background-color: #ffa; }
    30% { background-color: #ffa; }
    100% { }
}

@keyframes flash-long {
    0% { background-color: #ffa; }
    80% { background-color: #ffa; }
    100% { }
}

p:has(> :target), td:has(> :target) {
    animation: flash 5s ease 0s 1;
}
:target {
    animation: flash-long 10s ease 0s 1;
}