/* decode: same theme as northwards.ca/sentinel */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #71946E;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(18px, 1.1vw + 14px, 22px);
  line-height: 1.6;
}

main {
  max-width: 648px;
  margin: 0 auto;
  padding: 48px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

header { text-align: center; }

h1, h2 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 700;
  margin: 0;
}

h1 { font-size: clamp(60px, 8vw + 24px, 92px); line-height: 1.1; }
h2 { font-size: clamp(30px, 2vw + 22px, 40px); line-height: 1.2; margin-bottom: 20px; }

p { margin: 0; }

.tagline { font-size: 1.25em; margin-top: 12px; }

section > * + * { margin-top: 20px; }
section > h2 + * { margin-top: 0; }

.note { font-size: 0.86em; }
.note:empty { display: none; }

a { color: #fff; }

[hidden] { display: none !important; }

/* Drop zone */
.drop {
  background: rgba(0, 0, 0, 0.2);
  border: 2px dashed rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  padding: 44px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  transition: background-color 0.15s, border-color 0.15s;
}

.drop.over {
  background: rgba(0, 0, 0, 0.35);
  border-color: #fff;
  border-style: solid;
}

.drop-title { font-size: 1.15em; font-weight: 700; }
.drop-sub { font-size: 0.9em; }

/* Buttons */
.btn {
  background: #71946E;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  padding: 10px 28px;
  min-height: 48px;
  cursor: pointer;
}

.btn:hover { background: #fff; color: #3d5a3b; }
.btn:focus-visible, .btn-small:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.btn-wide { display: block; width: 100%; }

.btn-small {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 6px;
  font: inherit;
  font-size: 0.78em;
  font-weight: 700;
  padding: 0 14px;
  min-height: 44px;
  min-width: 68px;
  cursor: pointer;
}

.btn-small:hover { background: #fff; color: #3d5a3b; }

/* Results */
#results { display: flex; flex-direction: column; gap: 40px; }

.result { display: flex; flex-direction: column; gap: 16px; }

.result + .result { border-top: 2px solid rgba(255, 255, 255, 0.3); padding-top: 40px; }

.result-head { display: flex; align-items: center; gap: 16px; }

.thumb {
  width: 64px;
  height: 64px;
  flex: none;
  background: #fff;
  border-radius: 6px;
  object-fit: contain;
  padding: 4px;
}

.result-title { min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.result-name { font-weight: 700; overflow-wrap: anywhere; }
.result-kind { font-size: 0.9em; }

.group-title { font-weight: 700; margin-top: 8px; }

dl.fields {
  margin: 0;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 4px 18px;
}

.field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  min-height: 56px;
}

.field + .field { border-top: 1px solid rgba(255, 255, 255, 0.3); }

.field dt { flex: none; }

.field dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.mono { font-family: Consolas, Menlo, "Liberation Mono", monospace; }

.secret-value { font-weight: 400; letter-spacing: 1px; }

.plain-label { font-weight: 700; margin-top: 8px; }

.plain {
  margin: 0;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 16px 18px;
  font-family: Consolas, Menlo, "Liberation Mono", monospace;
  font-size: 0.82em;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 22em;
  overflow-y: auto;
}

.actions { display: flex; gap: 16px; flex-wrap: wrap; }
.actions .btn { flex: 1 1 200px; }

.warning { font-size: 0.86em; }

@media (max-width: 480px) {
  main { padding: 32px 16px 56px; gap: 40px; }
  .drop { padding: 32px 16px; }
  .field { flex-direction: column; align-items: flex-start; gap: 4px; }
  .field dd { text-align: left; justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .drop { transition: none; }
}
