/* IgLou Support: the public design (SPEC §8). Close enough to www.iglou.com to read as
   the same company. No framework; one file; fonts are self-hosted. */

@font-face {
    font-family: "Open Sans";
    src: url("fonts/open-sans-latin-wght-normal.woff2") format("woff2");
    font-weight: 300 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Open Sans";
    src: url("fonts/open-sans-latin-wght-italic.woff2") format("woff2");
    font-weight: 300 800;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Archivo";
    src: url("fonts/archivo-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Barlow Condensed";
    src: url("fonts/barlow-condensed-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Barlow Condensed";
    src: url("fonts/barlow-condensed-latin-500-normal.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Barlow Condensed";
    src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --blue-bar: #0f6faf;
    --blue-brand: #0c71c3;
    --blue-button: #1d4cc3;
    --blue-dark: #004f90;
    --text: #555;
    --heading: #23324a;
    --line: #e2e6ea;
    --soft: #f5f7f9;
    --footer: #eaeaea;
    --shadow: 0 2px 14px rgba(20, 40, 80, 0.10);
    --body-font: "Open Sans", Arial, Helvetica, sans-serif;
    --heading-font: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
    --nav-font: "Archivo", Arial, Helvetica, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--body-font);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding-bottom: 3rem;
}

.wrap {
    width: 100%;
    max-width: 62rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

a {
    color: var(--blue-button);
}

a:hover {
    color: var(--blue-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid #f5a623;
    outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
    font-family: var(--heading-font);
    font-weight: 500;
    line-height: 1.15;
    color: var(--heading);
    margin: 2rem 0 0.75rem;
}

h1 {
    font-size: 2.75rem;
    color: var(--blue-brand);
    margin-top: 1.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

img {
    max-width: 100%;
    height: auto;
}

.skip-link {
    position: absolute;
    left: -999rem;
    top: 0;
    background: #fff;
    color: var(--blue-dark);
    padding: 0.5rem 1rem;
    z-index: 10;
}

.skip-link:focus {
    left: 0;
}

.print-only {
    display: none;
}

/* For screen readers only. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Without this, any rule that sets "display" would show an element marked hidden. */
[hidden] {
    display: none !important;
}

/* Top bar and header */

.top-bar {
    background: var(--blue-bar);
    color: #fff;
    font-family: var(--nav-font);
    font-size: 0.8125rem;
    font-weight: 600;
}

.top-bar .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.top-bar a {
    color: #fff;
    text-decoration: none;
}

.top-bar a:hover {
    text-decoration: underline;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.site-header .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo img {
    display: block;
    width: 13rem;
}

.logo span {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--blue-bar);
    border-left: 2px solid var(--line);
    padding-left: 0.75rem;
}

.site-header ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    /* Four links, the logo and the search box share one row on a desktop screen. */
    gap: 0.25rem 1.1rem;
    margin: 0;
    padding: 0;
}

.site-header nav a {
    font-family: var(--nav-font);
    font-size: 0.9375rem;
    color: #666;
    text-decoration: none;
    padding: 0.25rem 0;
    display: inline-block;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
    color: var(--blue-brand);
}

.header-search {
    display: flex;
    gap: 0.4rem;
    flex: 0 1 11rem;
    /* Without this the box's own natural width decides, and the header takes two rows. */
    min-width: 0;
}

.header-search input {
    flex: 1;
    width: 0;
    min-width: 0;
    font: inherit;
    font-size: 0.9375rem;
    color: var(--heading);
    background: #fff;
    border: 1px solid #8a94a0;
    border-radius: 2px;
    padding: 0.35rem 0.6rem;
}

.header-search input::placeholder {
    color: #6b7480;
}

.header-search .button {
    font-size: 0.9375rem;
    padding: 0.45rem 0.8rem;
}

/* Home */

.hero {
    background: var(--soft);
    border-bottom: 1px solid var(--line);
    padding: 2.5rem 0;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin: 0 0 0.25rem;
}

.hero p {
    font-size: 1.125rem;
    margin: 0;
}

.lead {
    font-size: 1.125rem;
}

/* Search */

.search-form {
    max-width: 40rem;
    margin: 1.25rem 0 0;
}

.search-form label {
    display: block;
    font-family: var(--nav-font);
    font-size: 0.9375rem;
    color: var(--heading);
    margin-bottom: 0.35rem;
}

.search-row {
    display: flex;
    gap: 0.5rem;
}

.search-row input {
    flex: 1;
    min-width: 0;
    font: inherit;
    color: var(--heading);
    background: #fff;
    border: 1px solid #8a94a0;
    border-radius: 2px;
    padding: 0.55rem 0.75rem;
}

.search-row input::placeholder {
    color: #6b7480;
}

.search-summary {
    margin: 1.75rem 0 0.75rem;
}

.result-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 46rem;
}

.result-list li {
    padding: 1rem 0;
    border-top: 1px solid var(--line);
}

.result-list a {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
}

.result-list a:hover {
    text-decoration: underline;
}

.result-list p {
    margin: 0.25rem 0 0;
    font-size: 0.9375rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.no-results {
    max-width: 46rem;
    margin-top: 1.75rem;
    padding: 1.25rem 1.5rem;
    background: var(--soft);
    border-left: 4px solid var(--blue-bar);
    border-radius: 4px;
}

.no-results h2 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    overflow-wrap: anywhere;
}

.no-results p {
    margin: 0.5rem 0 0;
}

/* The status banner on the home page and on article pages */

.status-banner {
    margin: 1.5rem 0 0;
    padding: 1rem 1.25rem;
    background: #fff8e6;
    border: 1px solid #e8c583;
    border-left: 4px solid #b26a00;
    border-radius: 4px;
    color: #4a3200;
}

.status-banner-article {
    max-width: 46rem;
}

.status-banner h2,
.status-banner .status-title {
    margin: 0 0 0.35rem;
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.15;
    color: #4a3200;
}

.status-banner ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.status-banner li {
    margin: 0.3rem 0;
    overflow-wrap: anywhere;
}

.status-banner .status-detail {
    display: inline-block;
    font-size: 0.9375rem;
}

.status-banner p {
    margin: 0.5rem 0 0;
    font-size: 0.9375rem;
}

.status-banner a {
    color: #003f73;
}

/* Contact Us */

.contact-form {
    max-width: 40rem;
    margin-top: 1.5rem;
}

.field {
    margin: 0 0 1.1rem;
}

.field label {
    display: block;
    font-family: var(--nav-font);
    font-size: 0.9375rem;
    color: var(--heading);
    margin-bottom: 0.3rem;
}

.field .optional {
    color: #5a6470;
}

.field input,
.field textarea {
    display: block;
    width: 100%;
    font: inherit;
    color: var(--heading);
    background: #fff;
    border: 1px solid #8a94a0;
    border-radius: 2px;
    padding: 0.55rem 0.75rem;
}

.field textarea {
    line-height: 1.5;
    resize: vertical;
}

.field [aria-invalid="true"] {
    border-color: #b3261e;
    border-width: 2px;
}

textarea:focus-visible {
    outline: 3px solid #f5a623;
    outline-offset: 2px;
}

.extra-field {
    display: none;
}

.form-problems {
    max-width: 40rem;
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    background: #fdecec;
    border-left: 4px solid #b3261e;
    border-radius: 0 4px 4px 0;
    color: #7a1712;
}

.form-problems p,
.form-problems ul {
    margin: 0.25rem 0;
}

.form-problems ul {
    padding-left: 1.25rem;
}

.form-problems a {
    color: #7a1712;
    font-weight: 600;
}

.form-note {
    font-size: 0.9375rem;
}

/* ALTCHA's widget, in the site's colours and type. */

altcha-widget {
    --altcha-color-primary: #1d4cc3;
    --altcha-border-radius: 2px;
    --altcha-max-width: 20rem;
    font-family: var(--body-font);
}

/* Lists of articles and categories */

.article-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.article-list li + li {
    border-top: 1px solid var(--line);
}

.article-list a {
    display: block;
    padding: 0.8rem 1.1rem;
    font-weight: 600;
    text-decoration: none;
}

.article-list a:hover {
    background: var(--soft);
    text-decoration: underline;
}

.article-list li:has(.badge) {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-right: 1rem;
}

.article-list li:has(.badge) a {
    flex: 1;
}

.cards {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1.25rem;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    height: 100%;
    padding: 1.25rem 1.25rem 1rem;
    background: #fff;
    border-radius: 4px;
    border-top: 3px solid var(--blue-bar);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
}

.card:hover {
    color: var(--text);
    box-shadow: 0 4px 22px rgba(20, 40, 80, 0.18);
}

.card-title {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.15;
    text-transform: uppercase;
    color: var(--heading);
}

.card:hover .card-title {
    color: var(--blue-brand);
}

.card-text {
    font-size: 0.9375rem;
    line-height: 1.5;
}

.card-count {
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.8125rem;
    color: #666;
}

.badge {
    display: inline-block;
    font-family: var(--nav-font);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a4a00;
    background: #fff1d6;
    border: 1px solid #e8c583;
    border-radius: 3px;
    padding: 0 0.4rem;
}

/* Breadcrumb */

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 1.25rem 0 0;
    padding: 0;
    font-size: 0.875rem;
}

.breadcrumb li + li::before {
    content: "›";
    margin: 0 0.5rem;
    color: #888;
}

/* Buttons */

.button {
    display: inline-block;
    font-family: var(--heading-font);
    font-size: 1.0625rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
    color: #fff;
    background: var(--blue-button);
    border: 0;
    border-radius: 2px;
    padding: 0.65rem 1.1rem;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    color: #fff;
    background: var(--blue-dark);
}

/* Article */

.article {
    max-width: 46rem;
}

.article h1 {
    margin-bottom: 0.25rem;
}

.article-meta {
    margin: 0 0 1.5rem;
    font-size: 0.875rem;
    color: #666;
}

.article-body {
    overflow-wrap: break-word;
}

.article-body li {
    margin-bottom: 0.35rem;
}

.article-body img {
    display: block;
    margin: 1rem 0;
    border: 1px solid var(--line);
    border-radius: 3px;
}

.article-body table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.25rem 0;
    display: block;
    overflow-x: auto;
}

.article-body caption {
    text-align: left;
    font-weight: 600;
    padding-bottom: 0.4rem;
}

.article-body th,
.article-body td {
    border: 1px solid var(--line);
    padding: 0.5rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.article-body th {
    background: var(--soft);
    color: var(--heading);
}

.article-body code,
.article-body kbd {
    font-family: Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0.05em 0.35em;
}

.article-body pre {
    font-family: Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    background: #1f2a3a;
    color: #f3f6fa;
    border-radius: 4px;
    padding: 1rem 1.1rem;
    /* Long lines wrap. A box that scrolls sideways can't be reached from a keyboard. */
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.article-body pre code {
    background: none;
    border: 0;
    padding: 0;
    font-size: inherit;
}

.article-body blockquote {
    margin: 1.25rem 0;
    padding: 0.25rem 1.1rem;
    border-left: 4px solid var(--line);
    color: #666;
}

.article-body hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 2rem 0;
}

/* House styles: note, warning, tip, settings box, step list (SPEC §6) */

.article-body .note,
.article-body .warning,
.article-body .tip,
.article-body .settings {
    margin: 1.5rem 0;
    padding: 0.9rem 1.1rem 0.9rem 1.25rem;
    border-radius: 0 4px 4px 0;
    border-left: 5px solid;
}

.article-body .note > :first-child,
.article-body .warning > :first-child,
.article-body .tip > :first-child,
.article-body .settings > :first-child {
    margin-top: 0;
}

.article-body .note > :last-child,
.article-body .warning > :last-child,
.article-body .tip > :last-child,
.article-body .settings > :last-child {
    margin-bottom: 0;
}

.article-body .note::before,
.article-body .warning::before,
.article-body .tip::before {
    display: block;
    font-family: var(--heading-font);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.article-body .note {
    background: #edf5fc;
    border-color: var(--blue-bar);
    color: #33485c;
}

.article-body .note::before {
    content: "Note";
    color: #0b5c94;
}

.article-body .warning {
    background: #fdf1ee;
    border-color: #c0392b;
    color: #5c3530;
}

.article-body .warning::before {
    content: "Warning";
    color: #a52a1c;
}

.article-body .tip {
    background: #eef8f0;
    border-color: #2e8b47;
    color: #33503a;
}

.article-body .tip::before {
    content: "Tip";
    color: #1f6b34;
}

.article-body .settings {
    background: var(--soft);
    border-color: #8795a8;
    color: #3d4856;
    font-family: Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9375rem;
    overflow-wrap: anywhere;
}

.article-body ol.steps {
    list-style: none;
    counter-reset: step;
    margin: 1.5rem 0;
    padding: 0;
}

.article-body ol.steps > li {
    counter-increment: step;
    position: relative;
    margin: 0 0 1.1rem;
    padding-left: 3rem;
    min-height: 2.1rem;
}

.article-body ol.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -0.1rem;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--blue-bar);
    color: #fff;
    font-family: var(--heading-font);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 2.1rem;
    text-align: center;
}

.article-actions {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 2.5rem 0 0;
    padding: 1.5rem 0 0;
    border-top: 1px solid var(--line);
}

.action-status {
    min-height: 1.7rem;
    margin: 0.4rem 0 0;
    font-size: 0.875rem;
}

.related,
.article ~ .need-help {
    max-width: 46rem;
}

.also-in {
    font-size: 0.875rem;
}

.need-help {
    margin-top: 3rem;
    padding: 1.25rem 1.5rem;
    background: var(--soft);
    border-radius: 4px;
}

.need-help h2 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
}

.need-help p {
    margin: 0;
}

/* Footer */

.site-footer {
    background: var(--footer);
    font-size: 0.875rem;
    line-height: 1.5;
}

.site-footer > .wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem 3rem;
    padding-top: 2rem;
    padding-bottom: 1.5rem;
}

.site-footer p {
    margin: 0 0 0.6rem;
    font-family: var(--heading-font);
    font-size: 1.0625rem;
    color: var(--blue-dark);
}

.site-footer .company {
    font-size: 1.25rem;
    font-weight: 600;
}

.site-footer a {
    color: var(--blue-dark);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.policies {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: var(--nav-font);
}

.policies li {
    margin-bottom: 0.4rem;
}

.copyright {
    background: #222;
    color: #ddd;
    font-size: 0.8125rem;
    padding: 0.9rem 0;
}

/* Phones */

@media (max-width: 40rem) {
    h1 {
        font-size: 2.25rem;
    }

    .hero {
        padding: 1.75rem 0;
    }

    .hero h1 {
        font-size: 2.75rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .logo img {
        width: 10.5rem;
    }

    .logo span {
        font-size: 1.25rem;
    }

    .header-search {
        flex: 1 1 100%;
    }

    .article-actions .button {
        width: 100%;
        text-align: center;
    }

    .article-actions li {
        flex: 1 1 100%;
    }
}

/* Preview of unsaved text from the article editor: staff only. */

.preview-banner {
    margin-top: 1.25rem;
    padding: 0.6rem 1rem;
    background: #fff1d6;
    border: 1px solid #e8c583;
    border-radius: 4px;
    color: #5c3800;
}

.preview-banner p {
    margin: 0.25rem 0;
}

/* The link to the editor on an article page: logged-in staff only. */

.edit-link {
    margin-left: 0.75rem;
    font-weight: 600;
}

@media print {
    .edit-link {
        display: none;
    }
}
