/*
 * Oasis Network - deliberately plain.
 *
 * This site is for blind and low-vision people. Nothing here exists to look
 * good: the styling does three jobs and stops.
 *
 *   1. Keep text large and contrast high, because a great many people in
 *      this community have some sight and use magnification rather than a
 *      screen reader. That is the one visual thing worth doing well.
 *   2. Keep the reading order and the DOM order identical, so a screen
 *      reader hears the page in the order it is written.
 *   3. Make focus obvious and never hide anything from assistive tech.
 *
 * There is no decoration, no colour theming and no layout cleverness.
 */

/* A screen-reader-only helper: read aloud, never painted.
   Used for context that would be noise on screen but is vital in speech. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* The skip link is the exception: hidden until focused, then plainly visible. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #000;
    color: #fff;
    padding: 12px 16px;
    z-index: 100;
}
.skip-link:focus {
    left: 0;
}

html {
    font-size: 125%;
}

body {
    margin: 0 auto;
    padding: 0 1rem 4rem;
    max-width: 60rem;
    background: #fff;
    color: #000;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.7;
}

/* Focus must be unmistakable, for keyboard and magnifier users alike. */
:focus {
    outline: 4px solid #000;
    outline-offset: 2px;
}
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
summary:focus {
    background: #ff0;
    color: #000;
}

a {
    color: #00c;
}
a:visited {
    color: #518;
}
a:hover {
    color: #000;
}

h1, h2, h3 {
    line-height: 1.3;
    margin: 1.5em 0 0.3em;
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

hr {
    border: 0;
    border-top: 2px solid #000;
    margin: 2rem 0;
}

/* Landmarks are separated by rules rather than boxes, so the structure is
   audible through headings and visible without any styling. */
header.topbar,
footer.site-footer {
    border-bottom: 3px solid #000;
    padding: 0.5rem 0;
}
footer.site-footer {
    border-bottom: 0;
    border-top: 3px solid #000;
    margin-top: 3rem;
}

nav ul,
.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
nav li {
    display: inline;
}
nav li::after {
    content: " | ";
}
nav li:last-child::after {
    content: "";
}

/* The current page is announced with aria-current; this just matches it. */
[aria-current="page"] {
    font-weight: bold;
    text-decoration: underline;
}

/* Forms: every control is large, labelled and easy to hit. */
label {
    display: block;
    font-weight: bold;
    margin: 1rem 0 0.2rem;
}
input[type=text],
input[type=password],
input[type=email],
input[type=number],
textarea,
select {
    font: inherit;
    font-family: monospace;
    width: 100%;
    max-width: 40rem;
    padding: 0.5rem;
    border: 2px solid #000;
    background: #fff;
    color: #000;
}
textarea {
    min-height: 8rem;
}
input[type=checkbox] {
    width: 1.2rem;
    height: 1.2rem;
}

button,
.btn {
    font: inherit;
    padding: 0.4rem 0.9rem;
    border: 2px solid #000;
    background: #fff;
    color: #000;
    cursor: pointer;
    display: inline-block;
    text-decoration: underline;
}
button:hover,
.btn:hover {
    background: #000;
    color: #fff;
}

.field {
    margin-bottom: 0.5rem;
}
.actions > * {
    margin-right: 0.5rem;
}

/* Notices carry role="status" or role="alert" in the markup, which is what
   actually matters; the rule is only so they are not missed on screen. */
.notice {
    border: 3px solid #000;
    padding: 0.7rem;
    margin: 1rem 0;
}

/* Tables keep real headers and captions, so columns are announced. */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
caption {
    text-align: left;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 0.4rem 0;
}
th, td {
    border: 1px solid #000;
    padding: 0.5rem;
    text-align: left;
    vertical-align: top;
}
th {
    background: #eee;
}
.num {
    text-align: right;
}

/* Content lists: threads, posts, members. Plain blocks, clear separation. */
ul.list {
    list-style: none;
    margin: 0;
    padding: 0;
}
ul.list > li {
    border-bottom: 1px solid #000;
    padding: 0.7rem 0;
}

article {
    border-bottom: 2px solid #000;
    padding: 1rem 0;
}

blockquote {
    border-left: 4px solid #000;
    margin: 0.5rem 0 0.5rem 1rem;
    padding-left: 1rem;
}

.meta {
    font-size: 0.85rem;
}

/* Any long text keeps its line breaks and never overflows. */
.post-body {
    overflow-wrap: break-word;
}

code, pre {
    font-family: monospace;
    background: #eee;
    border: 1px solid #000;
    padding: 0.1rem 0.3rem;
}
pre {
    padding: 0.7rem;
    overflow-x: auto;
    white-space: pre-wrap;
}

details {
    border: 2px solid #000;
    padding: 0.5rem;
    margin: 0.5rem 0;
}
summary {
    cursor: pointer;
    font-weight: bold;
}

/* Honour a request for reduced motion; there is none here, but a future
   addition should not surprise anyone. */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
