/* The status page (status/page.ts), in the site's colours and typefaces:
   Dagger for headings, always lowercase, which the face draws as small caps;
   Quest for everything else; gilt headings; every corner cut rather than
   rounded. The values are the site's own (src/index.css), copied rather than
   loaded, so the page needs nothing from daggerquest.com to look right. */

@font-face {
    font-family: 'Dagger';
    src: url('/fonts/dagger-semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Quest';
    src: url('/fonts/quest-semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --ground: #100e0b;
    --panel: #181818ee;
    --line: rgb(255 255 255 / 0.12);
    --muted: #b8a989;
    --gold: #f6dc98;
    --link: #ffd966;
    --up: #7bd88f;
    --down: #ff8a7a;
    --notice: #ffd966;
    --unknown: #c9c1b1;
}

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

html {
    background:
        radial-gradient(120% 65% at 50% -8%, rgb(74 52 26 / 0.55), transparent 62%),
        radial-gradient(150% 120% at 50% 40%, transparent 55%, rgb(0 0 0 / 0.65) 100%),
        var(--ground);
    min-height: 100%;
}

body {
    margin: 0;
    color: #fff;
    font-family: 'Quest', serif;
    font-size: 1.2em;
    line-height: 1.5;
}

header,
main {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 16px;
}

header {
    position: relative;
    padding-top: 32px;
    text-align: center;
}

main {
    padding-bottom: 40px;
}

.logo img {
    height: 96px;
    width: auto;
}

h1,
h2 {
    font-family: 'Dagger', serif;
    text-transform: lowercase;
    font-weight: 600;
    text-wrap: balance;
    margin: 32px 0 12px;
}

h1 {
    font-size: 2em;
    letter-spacing: 2px;
    text-align: center;
    background-image: linear-gradient(180deg, #fff6d8 0%, #f6dc98 32%, #d3a952 52%, #b8893a 62%, #ecc874 82%, #fff0c2 100%);
    background-size: 100% 1lh;
    background-repeat: repeat-y;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.3em;
    color: var(--gold);
}

h3 {
    margin: 0 0 4px;
    font-size: 1.1em;
}

p {
    margin: 0 0 12px;
    text-wrap: pretty;
}

a {
    color: var(--link);
}

a:hover,
a:focus-visible {
    color: #fff;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgb(0 0 0 / 0.4);
}

/* The headline under the title, which only the owner writes. */
.summary {
    text-align: center;
    font-size: 1.15em;
    margin: 0 0 8px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--notice);
    background: var(--panel);
    border-radius: 10px;
}

.notice {
    padding: 16px 20px;
    margin-bottom: 12px;
    border-left: 4px solid var(--notice);
}
.notice p:last-child {
    margin-bottom: 0;
}
.notice-time {
    color: var(--muted);
    font-size: 0.85em;
}

.components {
    list-style: none;
    margin: 0;
    padding: 0;
}

.component {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 16px;
    padding: 14px 20px;
}
.component + .component {
    border-top: 1px solid var(--line);
}

.component-name {
    font-family: 'Dagger', serif;
    text-transform: lowercase;
}
.component-name a {
    color: inherit;
    text-decoration-color: rgb(255 217 102 / 0.5);
    text-underline-offset: 0.2em;
}
.component-name a:hover,
.component-name a:focus-visible {
    color: var(--link);
}

.component-state {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 8px;
    justify-content: flex-end;
}

/* The state's colour beside its word. */
.mark {
    display: inline-block;
    width: 0.6em;
    height: 0.6em;
    border-radius: 50%;
    corner-shape: round;
    background: var(--unknown);
    align-self: center;
}
.state-up .component-state { color: var(--up); }
.state-up .mark { background: var(--up); }
.state-down .component-state { color: var(--down); }
.state-down .mark { background: var(--down); }
.state-unknown .component-state { color: var(--unknown); }

.since {
    color: var(--muted);
    font-size: 0.85em;
    flex-basis: 100%;
    text-align: right;
}

.checked {
    color: var(--muted);
    font-size: 0.85em;
    margin-top: 8px;
}

.links {
    text-align: center;
    margin-top: 24px;
}

/* The site's choice of language (src/components/LanguageSwitcher.tsx and its
   rules in src/index.css), at the top right as the site's header has it. A
   <details> stands in for the site's button, since the page runs no script. */
.language-switcher {
    position: absolute;
    top: 16px;
    right: 16px;
    text-align: left;
}
.language-switcher-button {
    display: flex;
    padding: 13px 8px;
    border-radius: 6px;
    cursor: pointer;
    list-style: none;
    transition: background 0.18s;
}
.language-switcher-button::-webkit-details-marker {
    display: none;
}
.language-switcher-button:hover,
.language-switcher-button:focus-visible,
.language-switcher[open] > .language-switcher-button {
    background: #2a2a1f;
    outline: none;
}
.language-flag {
    display: block;
    flex-shrink: 0;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgb(255 217 102 / 0.25);
}
.language-switcher-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 30;
    margin: 8px 0 0;
    padding: 6px;
    list-style: none;
    background: #1a1814;
    border: 1px solid rgb(255 217 102 / 0.25);
    border-radius: 8px;
    box-shadow: 0 8px 24px #0009;
}
.language-switcher-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    white-space: nowrap;
    font-family: 'Dagger', serif;
    font-weight: 600;
    text-transform: lowercase;
    color: #e0d8c3;
    text-decoration: none;
    font-size: 1.15em;
    letter-spacing: 1.5px;
    border-radius: 6px;
    transition: background 0.18s, color 0.18s;
}
.language-switcher-menu a:hover,
.language-switcher-menu a:focus-visible {
    background: #2a2a1f;
    color: #fffbe6;
}
