/* Shared by every cellarport theme. Fonts are self-hosted (SIL Open Font
   License, see fonts/OFL-*.txt) so that no visitor's browser contacts a
   third party. */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fraunces-600.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 500 700; font-display: swap; src: url("fonts/fraunces-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"); }
@font-face { font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/young-serif.woff2") format("woff2"); }

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
img, svg { display: block; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site-head { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 8px 22px; flex-wrap: wrap; }
.site-head nav { display: flex; gap: 22px; font-size: 15px; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }

/* The file input stays visible (no JavaScript), so people can see what they
   chose; files dropped onto it are taken too. */
.drop { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; border: 2px dashed; text-align: center; }
.drop strong { font-weight: 600; }
.drop input[type=file] { width: 100%; font-size: 14px; }
.drop input[type=file]::file-selector-button { font: 600 14px Inter, sans-serif; border: 0; border-radius: 999px; padding: 9px 16px; margin-right: 10px; cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field select { height: 46px; padding: 0 12px; border-radius: 12px; font-weight: 500; }
details.source summary { cursor: pointer; font-size: 14px; }
details.source .field { margin-top: 10px; }
.note { font-size: 13px; text-align: center; }
.error { border-radius: 12px; padding: 12px 14px; font-size: 15px; }

.download { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.download .file { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.download .file small { display: block; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; counter-reset: step; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps li::before { counter-increment: step; content: counter(step); flex: none; display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.losses { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.losses dt, .losses dd { margin: 0; padding: 9px 0; border-top: 1px solid; }
.losses dd { text-align: right; font-variant-numeric: tabular-nums; padding-left: 16px; }
.files { list-style: none; margin: 10px 0 0; padding: 0; font-size: 15px; }
.files li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid; overflow-wrap: anywhere; }
.site-foot { font-size: 14px; padding-block: 24px 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* --- Enhancements (app.js); harmless when the script doesn't run --- */
.detected { display: block; text-align: left; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.detected ul { list-style: none; margin: 6px 0 0; padding: 0; }
.detected li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; overflow-wrap: anywhere; }
.detected li small { flex: none; opacity: 0.8; }
/* The submit button fills from left to right with the upload. */
button[type=submit] { position: relative; overflow: hidden; }
button[type=submit]:disabled { cursor: progress; }
.busy button[type=submit]::before { content: ""; position: absolute; inset: 0; width: var(--progress, 0%); background: rgba(255, 255, 255, 0.22); transition: width 0.2s ease-out; }
.btn-label { position: relative; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.drop .detected strong { font: 600 14px Inter, system-ui, sans-serif; }
