@font-face { font-family: Manrope; src: url('../fonts/Manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Bebas Neue'; src: url('../fonts/BebasNeue-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
:root { color-scheme: light; --blue: #30517f; --green: #acce6f; --ink: #1a2b3e; --cream: #f5f3ef; --sand: #eae7e1; --line: rgba(48,81,127,.16); --soft: #4a6b9a; --radius: 4px; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--cream); color: var(--ink); overflow-x: clip; }
body { font: 16px/1.6 Manrope, sans-serif; }
header, main, footer { width: min(1200px, 100%); margin: auto; padding: 24px 32px; }
header { display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
header img { width: 142px; height: 77px; }
.header-label { color: var(--blue); font-size: 14px; font-weight: 700; letter-spacing: .06em; }
header nav { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 20px; }
header nav a { margin-left: 0; }
a { color: var(--blue); text-underline-offset: 4px; }
header a, footer a { display: inline-flex; align-items: center; min-height: 44px; }
main { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 40px 72px; align-items: start; padding-top: 40px; }
.section-tag { margin: 0 0 10px; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--blue); }
h1, .history h2 { font-family: 'Bebas Neue', sans-serif; font-weight: 400; letter-spacing: .02em; line-height: 1.05; }
h1 { font-size: clamp(36px, 4vw, 48px); margin: 0 0 16px; }
.intro { color: var(--blue); margin: 0 0 24px; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 18px; background: #fff; }
legend { font-weight: 800; padding: 0 6px; color: var(--blue); }
label { font-weight: 600; display: block; margin-bottom: 8px; }
input[type="text"], input[type="number"], select { width: 100%; min-height: 48px; border: 1px solid var(--blue); border-radius: var(--radius); padding: 10px 12px; font: inherit; color: var(--ink); background: #fff; }
input[type="number"] { max-width: 130px; }
input[type="file"] { width: 100%; min-height: 48px; font: inherit; color: var(--ink); }
input::file-selector-button { font: inherit; min-height: 44px; border: 1px solid var(--blue); background: white; color: var(--blue); border-radius: var(--radius); padding: 8px 10px; cursor: pointer; margin-right: 10px; }
input::file-selector-button:hover { background: var(--cream); }
.filename { overflow-wrap: anywhere; font-size: 14px; margin: 4px 0; }
details { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 4px; }
summary { cursor: pointer; min-height: 44px; padding: 10px 0; color: var(--blue); font-size: 14px; }
details label { display: flex; justify-content: space-between; font-size: 14px; }
input[type="range"] { width: 100%; height: 44px; margin: 0 0 4px; accent-color: var(--blue); cursor: pointer; }
.hint { font-size: 13px; color: var(--blue); margin: 10px 0 18px; }
button { width: 100%; min-height: 48px; padding: 12px 16px; border: 2px solid transparent; border-radius: var(--radius); background: var(--green); color: var(--ink); font: 700 14px/1.5 Manrope, sans-serif; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
button:hover { background: var(--ink); color: white; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: wait; }
button.secondary { margin-top: 10px; background: transparent; color: var(--blue); border-color: var(--line); }
button.secondary:hover { background: var(--blue); border-color: var(--blue); color: white; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.skip-link { position: absolute; top: -100px; left: 20px; padding: 10px; background: #fff; z-index: 10; }
.skip-link:focus { top: 8px; }
#status, #error { font-size: 14px; margin: 14px 0 0; }
#error { border-left: 4px solid var(--blue); padding: 8px 12px; color: var(--ink); background: #fff; }
.preview { background: var(--sand); padding: 24px; border-radius: var(--radius); min-width: 0; }
.preview-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
h2 { font-size: 18px; margin: 0; }
.preview-heading span { font-size: 12px; color: var(--blue); }
.page-picker { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; }
.page-picker button { width: auto; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); font-size: 12px; color: var(--blue); background: #fff; }
.page-picker button:hover { background: var(--cream); }
.page-picker button[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
#artwork { aspect-ratio: 4 / 5; width: 100%; max-width: 480px; margin: auto; box-shadow: 0 8px 40px rgba(26,43,62,.14); background: var(--cream); }
#artwork svg { display: block; width: 100%; height: 100%; }
.history { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 32px; }
.history h2 { font-size: 36px; }
.history > .hint { max-width: 760px; }
#history-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.history-card { min-width: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.history-card img { width: 76px; height: 95px; object-fit: cover; }
.history-card h3 { font-size: 16px; margin: 0; overflow-wrap: anywhere; }
.history-card time { font-size: 12px; color: var(--blue); }
.history-card .actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.history-card button { min-height: 44px; padding: 8px; font-size: 12px; margin: 0; }
footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--blue); border-top: 1px solid var(--line); }
footer p { max-width: 720px; margin: 0; }
@media (max-width: 780px) { header, main, footer { padding-left: 20px; padding-right: 20px; } header { gap: 14px; } header img { width: 110px; height: auto; } .header-label { display: none; } main { grid-template-columns: 1fr; gap: 28px; } .preview { padding: 16px; } #artwork { max-width: 400px; } h1 { font-size: 38px; } .history { grid-column: auto; } }
@media (prefers-reduced-motion: reduce) { button { transition: none; } button:active { transform: none; } }
