@font-face {
  font-family: "Krungthep";
  src: url("/fonts/ChicagoFLF.ttf");
}

* {
  box-sizing: border-box;
}

html {
  background: #ffffff;
}

body.sop-page {
  min-height: 100vh;
  margin: 0;
  padding: 3.5rem 16px 2.5rem;
  overflow-x: hidden;
  background: url("/images/8.png") repeat;
  color: #000000;
  font-family: "Inconsolata", Menlo, monospace;
  font-size: 0.95rem;
  line-height: 1.55;
}

.sop-page .header {
  top: 0;
  left: 0;
}

.sop-page .menu-icon::before {
  content: "☰";
}

.sop-shell {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

.sop-window {
  position: relative;
  width: 100%;
  margin: 0 0 2rem;
  overflow: hidden;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 4px 4px 0 #000000;
}

.sop-content {
  padding: 26px 30px 30px;
}

.sop-intro {
  padding-bottom: 18px;
  border-bottom: 1px dashed #777777;
  margin-bottom: 24px;
}

.sop-intro h2,
.success-panel h2 {
  margin: 0 0 8px;
  font-family: "Krungthep", monospace;
  font-size: 1.35rem;
  line-height: 1.25;
}

.sop-intro p,
.success-panel p,
.privacy-note p {
  margin: 8px 0;
}

.form-section {
  margin: 0 0 22px;
  border: 1.5px solid #000000;
  background: #ffffff;
}

.section-heading {
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1.5px solid #000000;
  background: #eeeeee;
  font-family: "Krungthep", monospace;
  font-size: 1rem;
  line-height: 1.25;
}

.section-body {
  padding: 18px;
}

.field {
  margin: 0 0 18px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-label,
.question legend {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 0.95rem;
}

.required-mark {
  color: #9b1515;
}

.optional-label,
.help-text,
.field-status {
  color: #4b4b4b;
  font-size: 0.82rem;
}

.help-text {
  display: block;
  margin: 5px 0 0;
}

input[type="email"],
input[type="text"],
textarea,
select,
input[type="file"] {
  width: 100%;
  border: 1.5px solid #000000;
  border-radius: 0;
  background: #ffffff;
  color: #000000;
  font: inherit;
}

input[type="email"],
input[type="text"],
select {
  min-height: 38px;
  padding: 7px 9px;
}

textarea {
  min-height: 110px;
  padding: 9px;
  resize: vertical;
}

input[type="file"] {
  padding: 6px;
}

input[type="file"]::file-selector-button {
  margin-right: 9px;
  padding: 5px 10px;
  border: 1px solid #000000;
  border-radius: 0;
  background: #eeeeee;
  font-family: "Inconsolata", monospace;
  cursor: pointer;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #0000cc;
  outline-offset: 2px;
}

.question {
  min-width: 0;
  padding: 0 0 17px;
  border: 0;
  border-bottom: 1px dashed #aaaaaa;
  margin: 0 0 17px;
}

.question:last-child {
  padding-bottom: 0;
  border-bottom: 0;
  margin-bottom: 0;
}

.choices {
  display: flex;
  gap: 22px;
  margin-top: 9px;
}

.choice,
.confirmation-choice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.choice input,
.confirmation-choice input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 3px 0 0;
  accent-color: #000000;
}

.privacy-note {
  margin: 0 0 22px;
  padding: 13px 15px;
  border: 1px dashed #000000;
  background: #f7f7f7;
  font-size: 0.88rem;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sop-button {
  min-height: 34px;
  padding: 6px 14px;
  border: 1.5px solid #000000;
  border-radius: 0;
  box-shadow: 2px 2px 0 #000000;
  background: #eeeeee;
  color: #000000;
  font-family: "Inconsolata", monospace;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.sop-button:hover {
  background: #000000;
  color: #ffffff;
}

.sop-button:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

.sop-button:disabled {
  box-shadow: none;
  background: #d1d1d1;
  color: #666666;
  cursor: wait;
}

.button-link {
  display: inline-flex;
  align-items: center;
}

.form-message {
  min-height: 1.5em;
  margin: 12px 0 0;
  font-weight: 700;
}

.form-message.error {
  color: #9b1515;
}

.form-message.success {
  color: #155724;
}

.success-panel {
  padding: 4px 0;
}

.submission-id-box {
  margin: 20px 0;
  padding: 18px;
  border: 2px solid #000000;
  background: #eeeeee;
  text-align: center;
}

.submission-id-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.submission-id {
  display: block;
  overflow-wrap: anywhere;
  font-family: "Krungthep", monospace;
  font-size: clamp(1.25rem, 5vw, 2rem);
  letter-spacing: 0.05em;
  user-select: all;
}

.recovery-actions {
  margin-top: 16px;
}

.sop-footer .sop-content {
  padding: 14px 18px;
  font-size: 0.82rem;
}

.sop-footer p {
  margin: 3px 0;
}

.sop-page a {
  color: #000000;
}

.sop-page a:hover {
  color: #0000cc;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  body.sop-page {
    padding: 3.25rem 10px 1.5rem;
    font-size: 0.9rem;
  }

  .sop-content {
    padding: 20px 16px 22px;
  }

  .section-body {
    padding: 15px 13px;
  }

  .title-bar .title {
    font-size: 1rem;
  }

  .choices {
    gap: 18px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .sop-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
