:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7fb;
  color: #15263d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
}

.shell {
  width: min(100% - 2rem, 940px);
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.page-header { margin-bottom: 2rem; }
.eyebrow { margin: 0 0 .5rem; color: #496a99; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { margin-top: 0; }
h1 { margin-bottom: .75rem; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.04em; }
h2 { margin-bottom: 1rem; font-size: 1.15rem; }
.lede { max-width: 48rem; margin: 0; color: #4c5f78; line-height: 1.6; }

.panel {
  margin-top: 1rem;
  padding: 1.35rem;
  border: 1px solid #d6e0ed;
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 8px 24px rgb(34 62 94 / 7%);
}

.input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.file-field, .text-field { display: flex; flex-direction: column; gap: .45rem; color: #334d6f; font-size: .9rem; font-weight: 650; }
.text-field { margin-top: 1rem; max-width: 28rem; }
input[type="file"], input[type="text"] { width: 100%; padding: .65rem; border: 1px solid #b7c7db; border-radius: .4rem; background: #fbfdff; color: #182e4b; font: inherit; }
input:focus-visible, button:focus-visible, .result-json:focus-visible { outline: 3px solid #7ab3ff; outline-offset: 2px; }

.action-row, .download-row { display: flex; flex-wrap: wrap; gap: .65rem; }
button { padding: .65rem .9rem; border: 1px solid #245b98; border-radius: .4rem; background: #245b98; color: #fff; cursor: pointer; font: inherit; font-weight: 650; }
button:hover:not(:disabled) { background: #174779; }
button.quiet, button:disabled { border-color: #aebdcd; background: #edf2f7; color: #66758a; }
button:disabled { cursor: not-allowed; }

.result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.status { margin: -.5rem 0 0; color: #4c5f78; }
.hashes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1.5rem 0; }
.hashes div { min-width: 0; padding: .75rem; border-radius: .4rem; background: #f1f5fa; }
dt { color: #60728b; font-size: .78rem; font-weight: 700; text-transform: uppercase; }
dd { margin: .4rem 0 0; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
.result-json { min-height: 10rem; max-height: 28rem; margin: 0; overflow: auto; padding: 1rem; border-radius: .4rem; background: #15263d; color: #e5eefb; font: .8rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }

@media (max-width: 680px) {
  .shell { padding-top: 2rem; }
  .input-grid, .hashes { grid-template-columns: 1fr; }
  .result-heading { flex-direction: column; }
}
