/* SPDX-License-Identifier: EUPL-1.2
   Copyright (c) 2026 Stefy Lanza <stefy@nexlab.net> and ThinkDifferent S.r.l.
   This file is part of Auctio. See LICENSE for the full text. */

/* One stylesheet, no inline styles anywhere. The palette keeps every text
   at 4.5:1 or better on its background; state is never color alone. */
:root {
  --ground: #f6f6f3; --surface: #ffffff; --ink: #1b232c; --muted: #4f5b66; --rule: #c9cfd5;
  --accent: #7a2a2a; --accent-bg: #f6e8e8; --ok: #245c42; --ok-bg: #e4efe8; --info: #2a4f78; --info-bg: #e5edf6;
  --code-bg: #eceef0; --focus: #1f5fbf;
}
@media (prefers-color-scheme: dark) {
  :root { --ground: #12171d; --surface: #1a2129; --ink: #e6e9ec; --muted: #aab4bd; --rule: #3a444f;
    --accent: #e39a9a; --accent-bg: #3a2222; --ok: #9dd3b6; --ok-bg: #1d2f26; --info: #a9c6ea; --info-bg: #1c2938;
    --code-bg: #232b34; --focus: #8ab4f8; }
}
* { box-sizing: border-box; }
html { font-size: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: system-ui, "Segoe UI", Helvetica, Arial, sans-serif; line-height: 1.5; }
a { color: var(--info); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
header.site { border-bottom: 1px solid var(--rule); background: var(--surface); }
header.site .bar { max-width: 72rem; margin: 0 auto; padding: .6rem 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; }
header.site .brand { font-weight: 700; text-decoration: none; color: var(--ink); font-size: 1.1rem; }
header.site nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
header.site .who { margin-left: auto; color: var(--muted); font-size: .9rem; display: flex; gap: .75rem; align-items: center; }
main { max-width: 72rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
h1 { font-size: 1.6rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.2rem; margin: 1.8rem 0 .6rem; }
p, li { max-width: 70ch; }
code, .mono { font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; font-size: .92em; }
code { background: var(--code-bg); padding: .05em .3em; border-radius: 3px; }
.fingerprint { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; font-size: 1.05rem; background: var(--code-bg); padding: .6rem .8rem; border-radius: 4px; }
table { border-collapse: collapse; width: 100%; margin: .5rem 0 1rem; font-size: .95rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
caption { text-align: left; color: var(--muted); padding: .3rem 0; }
form { max-width: 40rem; }
label { display: block; font-weight: 600; margin: .8rem 0 .25rem; }
.hint { color: var(--muted); font-size: .9rem; margin: .1rem 0 .4rem; max-width: 60ch; }
input, select, textarea { font: inherit; width: 100%; padding: .5rem .6rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); color: var(--ink); }
input[type="checkbox"], input[type="radio"] { width: auto; margin-right: .4rem; }
input[type="file"] { padding: .35rem; }
fieldset { border: 1px solid var(--rule); border-radius: 4px; padding: .5rem 1rem 1rem; margin: 1rem 0; }
legend { font-weight: 600; padding: 0 .3rem; }
button, .button { font: inherit; font-weight: 600; padding: .55rem 1rem; border-radius: 4px; border: 1px solid var(--info); background: var(--info); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; margin-top: .8rem; }
button.secondary, .button.secondary { background: var(--surface); color: var(--info); }
button.danger { background: var(--accent); border-color: var(--accent); }
button[disabled] { opacity: .55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.status { padding: .6rem .8rem; border-radius: 4px; margin: .8rem 0; border-left: 4px solid; max-width: 70ch; }
.status-info { background: var(--info-bg); border-color: var(--info); }
.status-ok { background: var(--ok-bg); border-color: var(--ok); }
.status-error { background: var(--accent-bg); border-color: var(--accent); }
.status-ok::before { content: "✓ "; } .status-error::before { content: "✗ "; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.2rem; margin: 1rem 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: .5rem 0; }
dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; word-break: break-word; }
progress { width: 100%; height: 1.2rem; margin: .5rem 0; }
.state { display: inline-block; padding: .05em .5em; border-radius: 3px; background: var(--code-bg); font-size: .85em; }
.state-open, .state-completed { background: var(--ok-bg); color: var(--ok); }
.state-closed, .state-opening, .state-in_progress, .state-queued { background: var(--info-bg); color: var(--info); }
.state-failed, .state-canceled, .state-destroyed, .state-disabled { background: var(--accent-bg); color: var(--accent); }
tr.intact td:first-child::before { content: "✓ "; color: var(--ok); }
tr.not-intact td:first-child::before { content: "✗ "; color: var(--accent); }
.hashes li { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; word-break: break-all; }
footer.site { border-top: 1px solid var(--rule); color: var(--muted); font-size: .85rem; padding: 1.2rem 1rem; text-align: center; }
footer.site .links { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; }
footer.site p { margin: .3rem auto; max-width: none; }

/* the public site: the brand mark, the hero, the guarantees, the steps, the
   two columns, the verification box, the long pages. Same tokens, same type. */
header.site .brand { display: inline-flex; align-items: center; gap: .45rem; }
.mark { color: var(--accent); flex: none; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin: 0 0 .5rem; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 60ch; margin: 0 0 1.2rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 4rem; align-items: center; padding: 2rem 0 2.5rem; border-bottom: 1px solid var(--rule); }
.hero h1 { font-size: clamp(1.7rem, 4.2vw, 2.5rem); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .9rem; max-width: 22ch; text-wrap: balance; }
.hero .lede { font-size: 1.12rem; }
.hero-art { margin: 0; color: var(--ink); justify-self: center; }
.hero-art svg { max-width: 100%; height: auto; }
.hero-art .seal { fill: var(--accent); }
.cta { display: flex; flex-wrap: wrap; gap: .7rem; }
.cta .button { margin-top: 0; padding: .7rem 1.2rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; padding: 2rem 0; }
.feature { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1.2rem 1.3rem; }
.feature svg { color: var(--accent); display: block; margin-bottom: .6rem; }
.feature h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }
.how h2, .verify-box h2 { margin-top: .5rem; }
.steps { list-style: none; counter-reset: step; margin: .5rem 0 1rem; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.1rem 3rem; max-width: 70ch; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--info); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.steps li::after { content: ""; position: absolute; left: .95rem; top: 2rem; bottom: 0; border-left: 2px solid var(--rule); }
.steps li:last-child::after { display: none; }
.steps-long li { padding-bottom: 1.6rem; }
.steps-long h2 { margin: .1rem 0 .5rem; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem; padding: 1.5rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.column h3 { margin: 0 0 .4rem; font-size: 1.15rem; }
.column ul { padding-left: 1.2rem; margin: 0 0 .5rem; }
.column li { margin: .35rem 0; }
.verify-box { padding: 1.5rem 0 .5rem; }
.verify-box .actions .button { margin-top: .4rem; }
.prose { max-width: 70ch; }
.prose h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); line-height: 1.2; text-wrap: balance; }
.prose h2 { margin-top: 2rem; }
.prose .facts { margin: .8rem 0 1.2rem; }
.prose .facts dt { font-weight: 600; color: var(--ink); }
.contact { max-width: 40rem; }
.contact .button { margin-top: .4rem; }
code.wrap { word-break: break-all; }
@media (max-width: 40rem) {
  .hero { grid-template-columns: 1fr; padding-top: 1rem; }
  .hero-art { display: none; }
  dl.facts { grid-template-columns: 1fr; gap: .1rem 0; } dl.facts dd { margin-bottom: .6rem; }
}
@media (prefers-reduced-motion: no-preference) { a.button:hover, button:hover { filter: brightness(1.08); } }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the recovery kit: one share per sheet, nothing else on paper */
.kit-share { display: none; }
@media print {
  body { background: #fff; color: #000; }
  header.site, footer.site, .no-print, main > :not(#step-kit) { display: none !important; }
  #step-kit > :not(#kit) { display: none !important; }
  .kit-share { display: block; page-break-after: always; padding: 2cm; font-size: 12pt; }
  .kit-share .share { font-family: monospace; font-size: 13pt; word-break: break-all; border: 1px solid #000; padding: 1em; }
}
ul.documents { list-style: none; padding: 0; margin: 1rem 0; }
ul.documents li { margin: 0 0 1.2rem; }
ul.documents .button { margin-top: 0; }
ul.documents p { margin: .4rem 0 0; color: var(--muted); }
