:root {
  --bg: #14161a;
  --bg-raised: #1c1f25;
  --bg-inset: #101216;
  --border: #2c303a;
  --border-soft: #23262e;
  --text: #eae7e1;
  --text-dim: #9a9da5;
  --text-faint: #61646d;
  --accent: #e8b647;
  --accent-dim: #8a6a2c;
  --redacted: #2a2d34;
  --stamp-red: #c0392b;
  --stamp-green: #3f9142;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 20% 0%, rgba(232, 182, 71, 0.05), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(192, 57, 43, 0.04), transparent 40%);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* Header / brand */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 40px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  transform: rotate(-4deg);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-tag {
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  margin-left: 4px;
}

/* Typography */

h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 0 0 14px;
}

p.lede {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0 0 32px;
}

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.hint {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 6px;
}

/* Card / dossier panel */

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
}

.field {
  margin-bottom: 20px;
}

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

.row {
  display: flex;
  gap: 12px;
}

.row > .field {
  flex: 1;
}

input[type="text"],
input[type="number"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 70px;
}

::placeholder {
  color: var(--text-faint);
}

/* Buttons */

button, .btn {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 12px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

button:active, .btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #1a1508;
  width: 100%;
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--text-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px dashed var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  gap: 10px;
}

/* Response option pills (yes/no/maybe) */

.option-group {
  display: flex;
  gap: 8px;
}

.option-pill {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-inset);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.option-pill.selected[data-value="yes"] {
  background: rgba(63, 145, 66, 0.15);
  border-color: var(--stamp-green);
  color: #7fd382;
}

.option-pill.selected[data-value="maybe"] {
  background: rgba(232, 182, 71, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.option-pill.selected[data-value="no"] {
  background: rgba(192, 57, 43, 0.14);
  border-color: var(--stamp-red);
  color: #e77468;
}

.time-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-inset);
  margin-bottom: 8px;
  cursor: pointer;
}

.time-choice input {
  width: auto;
}

/* Status / stamp elements */

.status-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid currentColor;
}

.status-stamp.open {
  color: var(--accent);
}

.status-stamp.revealed {
  color: var(--stamp-green);
}

.status-stamp.expired {
  color: var(--stamp-red);
}

/* Progress bar */

.progress-track {
  height: 10px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: 999px;
  transition: width 0.5s ease;
}

.progress-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* Redacted bar (pre-reveal placeholder) */

.redacted {
  display: inline-block;
  background: var(--redacted);
  border-radius: 2px;
  height: 0.9em;
  vertical-align: -0.1em;
}

/* Utility */

.center {
  text-align: center;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.copy-row {
  display: flex;
  gap: 8px;
}

.copy-row input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
}

.error-box {
  background: rgba(192, 57, 43, 0.1);
  border: 1px solid var(--stamp-red);
  color: #e77468;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.error-box.show {
  display: block;
}

.muted {
  color: var(--text-faint);
  font-size: 12px;
}

a {
  color: var(--accent);
}

@media (max-width: 480px) {
  .row {
    flex-direction: column;
  }
  h1 {
    font-size: 24px;
  }
  .wrap {
    padding: 24px 16px 60px;
  }
}
