:root {
  --charcoal: #4b5660;
  --gold: #b89a4d;
  --paper-shadow: 0 10px 28px rgba(25, 33, 39, .18);
  --toolbar-height: 58px;
}

* { box-sizing: border-box; }
html { background: #eef0f2; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: #1f2529;
  background: #eef0f2;
}

.survey-toolbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--toolbar-height);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 16px;
  color: #fff;
  background: var(--charcoal);
  box-shadow: 0 2px 10px rgba(0,0,0,.16);
}
.survey-toolbar .title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toolbar-actions { display: flex; align-items: center; gap: 7px; }
.toolbar-actions button {
  appearance: none;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 5px;
  min-width: 36px;
  height: 34px;
  padding: 0 10px;
  cursor: pointer;
  font-weight: 600;
}
.toolbar-actions button:hover { background: rgba(255,255,255,.16); }

.instructions {
  max-width: 920px;
  margin: 18px auto 4px;
  padding: 0 18px;
  color: #59636a;
  font-size: 14px;
}

.document-stage {
  width: 100%;
  padding: 16px 12px 42px;
  overflow-x: auto;
}
.page-shell {
  position: relative;
  margin: 0 auto 24px;
}
.page-inner {
  position: absolute;
  left: 0;
  top: 0;
  width: 1654px;
  height: 2339px;
  transform-origin: top left;
  background: #fff;
  box-shadow: var(--paper-shadow);
}
.page-inner img {
  display: block;
  width: 1654px;
  height: 2339px;
  user-select: none;
  -webkit-user-drag: none;
}
.answer-field {
  position: absolute;
  z-index: 3;
  display: block;
  resize: none;
  overflow: auto;
  margin: 0;
  padding: 0 4px;
  border: 1px solid transparent;
  outline: none;
  background: transparent;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30.67px;
  line-height: 40px;
  letter-spacing: 0;
  caret-color: #111;
  scrollbar-width: thin;
}
.answer-field:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(184,154,77,.26);
}
.answer-field:focus {
  background: rgba(255,255,255,.16);
  border-color: rgba(184,154,77,.78);
  box-shadow: 0 0 0 2px rgba(184,154,77,.15);
}

.submit-panel {
  max-width: 920px;
  margin: 0 auto 70px;
  padding: 22px;
  background: #fff;
  border: 1px solid #d7dbde;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(25,33,39,.08);
}
.submit-panel p { margin: 0 0 14px; color: #4f5960; line-height: 1.45; }
.submit-button {
  appearance: none;
  border: 0;
  border-radius: 5px;
  padding: 13px 22px;
  background: var(--charcoal);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.submit-button:hover { filter: brightness(.94); }
.submit-button:disabled { opacity: .55; cursor: wait; }

.status-message {
  margin-top: 14px;
  min-height: 22px;
  font-size: 14px;
}
.status-message.error { color: #9b2d23; }
.status-message.success { color: #326444; font-weight: 600; }

.closed-panel {
  max-width: 760px;
  margin: 50px auto;
  padding: 28px;
  background: white;
  border-radius: 8px;
  box-shadow: var(--paper-shadow);
}

.honeypot { position: absolute !important; left: -10000px !important; opacity: 0 !important; }

@media (max-width: 680px) {
  .survey-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .survey-toolbar .title { flex-basis: 100%; }
  .instructions { font-size: 13px; }
}

.test-banner { margin:0; padding:12px; background:#fff1c0; color:#533d00; font-weight:700; text-align:center; }
