/*
  style.css — Shared styles for all three pages.

  Intentionally plain and simple. No frameworks, no tricks.
  Just enough to look clean and readable on any screen size.
*/

/* --- Reset & base --- */

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  max-width: 600px;
  margin: 40px auto;
  padding: 0 20px;
  color: #222;
  background: #fafafa;
}

/* --- Typography --- */

h1 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

p.subtitle {
  color: #666;
  margin-bottom: 24px;
}

/* --- Forms --- */

label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

textarea,
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 12px;
}

textarea {
  height: 120px;
  resize: vertical;
}

button {
  padding: 10px 20px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

button:hover {
  background: #555;
}

button:disabled {
  background: #999;
  cursor: not-allowed;
}

/* --- Honeypot field (hidden from real users, visible to bots) --- */

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* --- Messages & cards --- */

.message {
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.message.error {
  background: #fee;
  color: #900;
  border: 1px solid #fcc;
}

.message.success {
  background: #efe;
  color: #060;
  border: 1px solid #cec;
}

.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
}

.card .meta {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 8px;
}

.card .question {
  margin-bottom: 12px;
}

.card .answer {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 4px;
  margin-top: 8px;
}

.card .unanswered {
  color: #999;
  font-style: italic;
}

/* --- Char counter --- */

.char-count {
  text-align: right;
  font-size: 0.85rem;
  color: #888;
  margin-top: -8px;
  margin-bottom: 12px;
}

/* --- Link display (for the token link after asking) --- */

.link-box {
  background: #fff;
  border: 1px solid #ccc;
  padding: 12px;
  border-radius: 4px;
  word-break: break-all;
  margin-bottom: 12px;
}

.link-box a {
  color: #06c;
}
