/* SPDX-License-Identifier: GPL-3.0-only
 * Canon SLOOP installer (https://sloop.dpslabs.dev): Canon's "classical" theme (github.com/dpshde/canon,
 * apps/web/src/lib/styles.css): aged paper and ink, a gold accent, the Safe / Color / Bold tier colours.
 * Fonts self-hosted (SIL OFL 1.1, fonts/OFL-*.txt): the CSP allows nothing from another origin. */
@font-face { font-family: "Libre Baskerville"; font-style: normal; font-weight: 400 700; font-display: swap;
             src: url(fonts/libre-baskerville.woff2) format("woff2"); }
@font-face { font-family: "Libre Baskerville"; font-style: italic; font-weight: 400; font-display: swap;
             src: url(fonts/libre-baskerville-italic.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
             src: url(fonts/inter.woff2) format("woff2"); }

:root {
  --paper: #FAF8F3; --paper-dark: #F5F2EA; --ink: #2C2416; --ink-light: #5A4D3A; --ink-muted: #8B7D6B;
  --line: #C4B8A4; --gold: #B8956C;
  --safe: #5B7C5D; --color: #9C6B3C; --bold: #8B3A4C;
  --serif: "Libre Baskerville", Georgia, serif; --sans: "Inter", system-ui, -apple-system, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #1C1914; --paper-dark: #141210; --ink: #E8E4DC; --ink-light: #B8B0A0; --ink-muted: #7A7266;
          --line: #3D3830; --gold: #C9A86C; --safe: #6B9C6D; --color: #C88B4C; --bold: #B85A6C; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.65 var(--sans);
       -webkit-font-smoothing: antialiased; }
main { max-width: 600px; margin: 0 auto; padding: 40px 20px 56px; }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: baseline; gap: 12px; }
.logo img { display: block; width: 168px; height: auto; }
.logo span { font: 600 12px/1 var(--sans); letter-spacing: .22em; color: var(--ink-muted); }
.lang { font: 13px var(--serif); font-style: italic; color: var(--ink-muted); cursor: pointer; background: none;
        border: 0; padding: 0; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.strip { display: flex; gap: 6px; height: 2px; margin: 22px 0 30px; }
.strip i { flex: 1; border-radius: 1px; }
.strip i:nth-child(1) { background: var(--safe); } .strip i:nth-child(2) { background: var(--color); }
.strip i:nth-child(3) { background: var(--bold); } .strip i:nth-child(4) { background: var(--gold); }

h1 { font: 400 30px/1.2 var(--serif); letter-spacing: -.01em; margin: 0 0 14px; }
.lead { font: 400 17px/1.6 var(--serif); color: var(--ink-light); margin: 0 0 28px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 30px; }
.tile { background: var(--paper-dark); border: 1px solid var(--line); border-top: 3px solid var(--c);
        border-radius: 10px; padding: 12px 12px 14px; min-height: 104px; }
.tile b { display: block; font: 700 22px/1.1 var(--serif); color: var(--c); }
.tile span { display: block; font-size: 12.5px; line-height: 1.45; color: var(--ink-muted); margin-top: 6px; }
p { margin: 0 0 14px; }

button#go { font: 600 15px/1 var(--sans); background: var(--ink); color: var(--paper); border: 0; border-radius: 10px;
            padding: 17px 0; width: 100%; cursor: pointer; letter-spacing: .06em; transition: background .15s; }
button#go:hover:not(:disabled) { background: var(--gold); color: #1C1914; }
button#go:disabled { background: var(--paper-dark); color: var(--ink-muted); border: 1px solid var(--line); cursor: default; }
#status { margin-top: 14px; min-height: 1.6em; font-family: var(--serif); font-variant-numeric: tabular-nums; }
.small { color: var(--ink-muted); font-size: 13px; }
progress { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; margin-top: 18px; border: 0;
           border-radius: 2px; background: var(--paper-dark); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--paper-dark); }
progress::-webkit-progress-value { background: var(--gold); }
progress::-moz-progress-bar { background: var(--gold); }
pre { color: var(--ink-muted); font-size: 11px; white-space: pre-wrap; margin-top: 12px; max-height: 160px; overflow: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0 20px; }
[hidden] { display: none !important; }
button.ed { font: inherit; color: var(--ink); border: 0; cursor: pointer; }
.ed { display: inline-block; margin: 8px 0 0; padding: 10px 14px; background: var(--paper-dark); border-radius: 10px;
      text-decoration: none; }
details { margin: 24px 0 0; } summary { cursor: pointer; font: 700 15px var(--serif); }
button#stock-go { font: 600 14px/1 var(--sans); background: var(--paper-dark); color: var(--ink); border: 1px solid var(--line);
                  border-radius: 10px; padding: 12px 16px; cursor: pointer; }
button#stock-go:disabled { color: var(--ink-muted); cursor: default; }
input[type=file] { font: 13px var(--sans); color: var(--ink-light); }
@media (max-width: 460px) { .tiles { grid-template-columns: repeat(2, 1fr); } .logo img { width: 132px; } h1 { font-size: 25px; } }
