/* werkrevisor web page in the visual family of Werkator (its RFC 0001 "Kin"): white paper, IBM Plex,
   a blue-shifted petrol as the only accent, a neutral dark mode. The tokens on :root are Werkator's,
   so that the dashboard looks the same when Werkator embeds it. */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/plex-sans.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/plex-mono-500.woff2") format("woff2"); }

:root {
    color-scheme: light dark;
    /* neutrals: the blog's scale */
    --bg: #ffffff;
    --panel: #fafafa;
    --panel-2: #f4f5f5;
    --line: #e4e7e7;
    --line-2: #d1d6d5;
    --text: #141616;
    --text-2: #3e4645;
    --muted: #6e7c7a;
    --ghost: #9ea9a7;
    /* petrol, blue-shifted: the blog's primary-600 (#0F6E66) moved from hue 175° to 190° */
    --accent: #0e6b7d;
    --accent-2: #0a5262;
    --accent-soft: #e3f0f3;
    --accent-soft-2: #c6e0e6;
    /* clay for failures: serious without shouting */
    --clay: #b0563b;
    --clay-soft: #f6e9e4;
    /* the system page's three levels: ok is the accent, "watch" a yellow amber, "critical" a red
       clearly redder than the clay of a failed build */
    --amber: #b8860b;
    --amber-soft: #f9f0d2;
    --crit: #b3261e;
    --crit-soft: #f8e2df;
    --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    --shadow: 0 2px 6px rgb(20 22 22 / 0.05);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #242928;
        --panel: #2a302f;
        --panel-2: #313837;
        --line: #3e4645;
        --line-2: #545f5d;
        --text: #f4f5f5;
        --text-2: #d1d6d5;
        --muted: #9ea9a7;
        --ghost: #6e7c7a;
        --accent: #63bccb;
        --accent-2: #8ed0db;
        --accent-soft: #1f3b41;
        --accent-soft-2: #27505a;
        --clay: #e09070;
        --clay-soft: #3e2a22;
        --amber: #e3b341;
        --amber-soft: #3d3418;
        --crit: #ef6f66;
        --crit-soft: #45201d;
        --shadow: 0 2px 6px rgb(0 0 0 / 0.25);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #242928;
    --panel: #2a302f;
    --panel-2: #313837;
    --line: #3e4645;
    --line-2: #545f5d;
    --text: #f4f5f5;
    --text-2: #d1d6d5;
    --muted: #9ea9a7;
    --ghost: #6e7c7a;
    --accent: #63bccb;
    --accent-2: #8ed0db;
    --accent-soft: #1f3b41;
    --accent-soft-2: #27505a;
    --clay: #e09070;
    --clay-soft: #3e2a22;
    --amber: #e3b341;
    --amber-soft: #3d3418;
    --crit: #ef6f66;
    --crit-soft: #45201d;
    --shadow: 0 2px 6px rgb(0 0 0 / 0.25);
}

:root[data-theme="light"] {
    color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); }
main { width: min(1180px, calc(100% - 64px)); margin: 0 auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
.view-title { margin: 28px 0 18px; font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }

.icon { display: inline-block; width: 16px; height: 16px; flex: none; vertical-align: -3px; background-color: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.icon-key { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='M10.8 12.2 20 3M17 6l2.5 2.5M14 9l2.5 2.5'/%3E%3C/svg%3E"); }
.icon-theme { --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 3a9 9 0 0 0 0 18z' fill='black' stroke='none'/%3E%3C/svg%3E"); }

.site-header { position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.site-header-inner { width: min(1180px, calc(100% - 64px)); margin: 0 auto; display: flex; align-items: center; gap: 10px; min-height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; color: var(--text); }
.brand:hover { color: var(--accent); }
.logo { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--accent); stroke-width: 7.5; stroke-linecap: round; stroke-linejoin: round; }
.site-nav { margin-left: auto; display: inline-flex; align-items: center; gap: 22px; font-weight: 500; color: var(--text-2); }
.site-nav .current { padding: 14px 0; color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.icon-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); color: var(--text-2); cursor: pointer; }
.icon-button:hover { color: var(--accent); border-color: var(--accent-soft-2); background: var(--accent-soft); }
/* A stored read token: the key shows that the page is in its reader form. */
#token-button.is-active { color: var(--accent); border-color: var(--accent); }
#token-button.is-rejected { color: var(--crit); border-color: var(--crit); }

.site-footer { width: min(1180px, calc(100% - 64px)); margin: 56px auto 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 13px; }
.site-footer a:hover { color: var(--accent); }
.site-footer .version { color: var(--accent); font-weight: 500; }
.site-footer-links { margin-left: auto; display: inline-flex; gap: 14px; }

@media (max-width: 640px) {
    main, .site-header-inner, .site-footer { width: calc(100% - 32px); }
    .site-nav { gap: 14px; font-size: 14px; }
    .site-nav .current { display: none; }
    .view-title { font-size: 22px; }
}
