*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/*Original names taken from an online template and fit to DSA colors*/
:root {
  --cream: #FFFFFF;
  --warm:  #e4e4e4;
  --sand:  #e4e4e4;
  --clay:  #e4e4e4;
  --ink:   #0098D7;
  --red:   #c05e3c;
  --green: #618E1C;
  --r:     14px;
  --header-height: 100px;
}

html, body {
  min-height: 100dvh;
  background: var(--cream);
  color: var(--ink);
  font-family: Corbel, sans-serif;
  
}

header {
  background: var(--ink);
  color: var(--cream);
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--header-height);
}
header h1 {
  font-family: Corbel, sans-serif;
  font-weight: 600; font-size: 1.5rem;
  letter-spacing: -0.02em;
}
header h1 em { font-style: italic; font-weight: 400; color: var(--cream); }

header img {height: 75px; width: auto;}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 3px 10px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.badge.ok  { background: rgba(74,124,89,0.3);  color: #8ecba0; }
.badge.err { background: rgba(192,94,60,0.3);  color: #f0a080; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

main {
  max-width: 70%; margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--header-height));
  padding: 10px;
}

#survey {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#nav {
  padding: 10px 0 0 0;
}

/* drop zone */
.drop {
  border: 2px dashed var(--sand);
  border-radius: var(--r);
  background: var(--warm);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.drop.over { border-color: var(--clay); background: #e8dece; }
.drop.has-image { padding: 0; border-style: solid; border-color: var(--sand); overflow: hidden; }

.drop-inner { pointer-events: none; }
.drop-inner .icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.drop-inner p { font-size: 0.87rem; color: var(--clay); line-height: 1.5; }
.drop-inner p strong { color: var(--red); }

.preview-img {
  display: none;
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover; border-radius: calc(var(--r) - 2px);
}

/* buttons */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* progress + status */
.bar { height: 3px; background: var(--sand); border-radius: 2px; overflow: hidden; display: none; }
.fill { height: 100%; background: var(--green); width: 0; transition: width .3s; }
.status { font-size: 0.82rem; text-align: center; color: var(--clay); min-height: 18px; }
.status.ok  { color: var(--green); font-weight: 600; }
.status.err { color: var(--red); }

/* done */
#done { display: none; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 30px 10px; }
#done.show { display: flex; }
#done .check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--green); color: #fff;
  font-size: 1.8rem; display: flex; align-items: center; justify-content: center;
  animation: pop .4s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes pop { from { transform:scale(0); opacity:0; } to { transform:scale(1); opacity:1; } }
#done h2 { font-family: Corbel, sans-serif; font-size: 1.3rem; }
#done p  { font-size: 0.85rem; color: var(--clay); line-height: 1.5; }
#done code { font-size: 0.72rem; color: var(--sand); word-break: break-all; }

/* nav buttons */
.status.ok  { color: var(--bs-success); }
.status.err { color: var(--bs-danger); }

.step {
  display: none;
}
.step.active {
  display: block;
}

#survey-wrapper {
  position: relative;
}

.help-btn {
  position: absolute;
  top: 0px;
  right: 0;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
}

.help-icon {
  font-size: 1.3rem;
  color: var(--red);
  transition: color 0.2s ease;
}

.help-btn:hover .help-icon,
.help-btn:focus .help-icon {
  color: var(--red); /* darker blue on hover */
}

.help-btn:focus {
  outline: none;
  box-shadow: none;
}