:root {
  color-scheme: light;
  --paper: #eff1f3;
  --surface: #ffffff;
  --ink: #202831;
  --quiet: #465362;
  --accent: #273b52;
  --focus: #285b83;
  --line: #d3dbe2;
  --error: #912c27;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, select, input { font: inherit; }
button, a, summary, select { -webkit-tap-highlight-color: transparent; }
::selection { background: #d5e3ef; color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.frame { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--line); }
.wordmark { padding-block: 20px; font-size: 18px; font-weight: 680; letter-spacing: -.025em; }
.intro { padding-block: 53px 33px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(36px, 6.2vw, 68px); font-weight: 650; letter-spacing: -.04em; line-height: 1.04; }
.intro p { margin-top: 15px; font-size: 18px; line-height: 1.48; color: var(--quiet); }
.layout { display: grid; grid-template-columns: minmax(0, 1.43fr) minmax(0, 1fr); gap: 28px; padding-bottom: 48px; }
.workspace, .pack { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: 14px; }
.workspace { background: var(--surface); }
.pack { align-self: start; background: #e5ebf0; }
h2 { font-size: 21px; font-weight: 650; line-height: 1.28; letter-spacing: -.015em; }
fieldset { min-width: 0; margin: 17px 0 0; padding: 0; border: 0; }
.drop {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 174px;
  padding: 20px 12px;
  border: 1px dashed #76899a;
  border-radius: 12px;
  color: var(--quiet);
  text-align: center;
  line-height: 1.4;
  background: #f4f7f9;
}
.drop:hover, .drop.dragging { background: #e7eef5; border-color: var(--focus); }
.drop:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.drop strong { color: var(--accent); font-size: 18px; font-weight: 650; }
.drop small { display: block; margin-top: 13px; font-size: 12px; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop input:disabled { cursor: wait; }
.files { list-style: none; margin: 13px 0 0; padding: 0; }
.files li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-block: 10px; border-bottom: 1px solid var(--line); }
.files li > span { min-width: 0; overflow-wrap: anywhere; }
.files small { display: block; margin-top: 4px; }
.files button { border: 0; padding: 6px 0 6px 6px; color: var(--quiet); background: none; cursor: pointer; }
.files a { flex: none; color: var(--accent); font-weight: 630; text-underline-offset: 3px; }
.settings { margin-block: 13px 17px; border-bottom: 1px solid var(--line); }
.settings summary { padding-block: 13px; cursor: pointer; color: var(--accent); font-weight: 620; }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-bottom: 16px; }
.fields label { min-width: 0; font-size: 13px; color: var(--quiet); }
.fields select { display: block; width: 100%; min-height: 40px; margin-top: 5px; padding: 5px; border: 1px solid #a9b6c1; border-radius: 6px; background: var(--surface); color: var(--ink); }
.primary { width: 100%; min-height: 48px; border: 0; border-radius: 8px; font-weight: 650; background: var(--accent); color: white; cursor: pointer; }
.primary:enabled:hover { background: #345473; }
.primary:disabled { background: #dce3ea; color: #465362; cursor: default; }
.loader { margin-top: 15px; padding: 14px 16px; border-radius: 8px; background: #edf3f8; }
.loader-file { font-weight: 620; overflow-wrap: anywhere; }
.loader-details { display: flex; justify-content: space-between; gap: 12px; margin-block: 5px 9px; color: var(--quiet); font-size: 14px; }
.loader-details span { flex: none; font-variant-numeric: tabular-nums; }
.loader progress { display: block; width: 100%; height: 8px; accent-color: var(--focus); }
.loader progress[value] { appearance: none; border: 0; border-radius: 999px; background: #d7e2ed; }
.loader progress::-webkit-progress-bar { border-radius: 999px; background: #d7e2ed; }
.loader progress::-webkit-progress-value { border-radius: 999px; background: var(--focus); }
.loader progress::-moz-progress-bar { border-radius: 999px; background: var(--focus); }
.message { margin-top: 11px; color: var(--quiet); font-size: 14px; }
.message:empty { display: none; }
.error { color: var(--error); }
.results { margin-top: 23px; }
.pack dl { margin-block: 15px 19px; }
.pack dl > div { padding-block: 12px; border-bottom: 1px solid #cdd7df; }
.pack dt { font-size: 15px; font-weight: 650; }
.pack dd { margin: 4px 0 0; color: var(--quiet); font-size: 14px; }
.preview { display: block; }
.preview img { display: block; width: 100%; height: auto; border-radius: 5px; }

@media (max-width: 795px) {
  .frame { width: min(620px, calc(100% - 36px)); }
  .intro { padding-block: 35px 24px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 17px; }
}

@media (max-width: 425px) {
  .workspace, .pack { padding: 18px; }
  .intro p { font-size: 16px; }
  .fields { grid-template-columns: minmax(0, 1fr); }
}
