:root {
  --cream: #f6efd6;
  --cream-border: #e3d9b6;
  --maroon: #6e1414;
  --maroon-dark: #4a0d0d;
  --text: #1c1c1c;
  --muted: #6b6b6b;
  --line: #e5e5e5;
  --bg: #eef0f2;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }
body {
  margin: 0;
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

header.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--cream-border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

header.site-header a.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.crest {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--maroon);
  color: #f5efe0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  line-height: 1.1;
  overflow: hidden;
  word-break: break-word;
}

.wordmark {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: #2b2b2b;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px 20px;
}

/* ---- login ---- */
.login-page main {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8vh;
}

.login-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  padding: 32px 28px;
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.login-card .crest {
  width: 84px;
  height: 84px;
  font-size: 13px;
  margin: 0 auto 16px auto;
}

.login-card h1 {
  font-size: 17px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 22px 0;
}

.field {
  position: relative;
  margin-bottom: 14px;
  text-align: left;
}

.field input {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: inherit;
}

.field input:focus { outline: 2px solid var(--maroon); outline-offset: 1px; }

.toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: #888;
  padding: 4px;
}

.btn {
  display: block;
  width: 100%;
  background: #1c1c1c;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover { background: #333; }

.hint {
  font-size: 12px;
  color: #999;
  margin-top: 16px;
  line-height: 1.5;
}

.error-msg {
  display: none;
  background: #fdecea;
  color: #a33;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 5px;
  margin-bottom: 14px;
  text-align: left;
}
.error-msg.show { display: block; }

/* ---- inbox ---- */
.inbox-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px 0;
}
.inbox-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

.inbox-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }

.inbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.inbox-row:hover { background: #fafafa; }
.inbox-row.unread .subj, .inbox-row.unread .from { font-weight: 700; }
.inbox-row .from { width: 130px; flex-shrink: 0; font-size: 14px; }
.inbox-row .subj { flex: 1; font-size: 14px; min-width: 0; }
.inbox-row .clip { color: #999; font-size: 13px; }
.inbox-row .time { font-size: 12.5px; color: var(--muted); flex-shrink: 0; white-space: nowrap; }

/* ---- mail page ---- */
.back-link {
  display: inline-block;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 18px;
}
.back-link:hover { color: var(--text); }

.mail-subject { font-size: 21px; font-weight: 700; margin: 0 0 4px 0; }
.mail-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.mail-body { font-size: 15px; line-height: 1.65; }
.mail-body p { margin: 0 0 14px 0; }
.mail-body .quoted { font-style: italic; color: #333; }
.mail-body .signoff { margin: 4px 0 14px 0; }

.attach-block { margin-top: 22px; }
.attach-row { display: flex; flex-wrap: wrap; gap: 14px; }
.attach-thumb { text-align: center; font-size: 12px; color: var(--muted); width: 140px; }
.attach-thumb .thumb-box {
  width: 140px; height: 96px; border: 1px solid #ccc; border-radius: 4px;
  background: #e6e6e6; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #777; margin-bottom: 6px; text-align: center; padding: 6px;
}
.attach-thumb a { color: inherit; text-decoration: none; }
.attach-thumb.forum .thumb-box { background: #17181a; color: #9aa0a6; }
.thumb-img { width: 140px; height: 96px; object-fit: cover; border-radius: 4px; border: 1px solid #ccc; display: block; margin-bottom: 6px; }

.placeholder-tag {
  display: inline-block; background: #fff3cd; color: #6b5300; font-size: 11.5px;
  padding: 4px 10px; border-radius: 4px; margin-bottom: 14px; border: 1px solid #e0c46c;
}

.audio-box {
  background: #f7f8f9; border: 1px solid #dde1e4; border-radius: 6px;
  padding: 14px 16px; margin: 18px 0; display: flex; align-items: center; gap: 12px;
}
.audio-box button {
  width: 34px; height: 34px; border-radius: 50%; background: #1c1c1c; color: #fff;
  border: none; cursor: pointer; font-size: 13px; flex-shrink: 0;
}
.audio-box .track { flex: 1; height: 3px; background: #ccc; border-radius: 2px; position: relative; }
.audio-box .track .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: var(--maroon); border-radius: 2px; }
.audio-box .time-label { font-size: 12px; color: #888; font-family: 'Courier New', monospace; flex-shrink: 0; }
.audio-caption { font-size: 12px; color: var(--muted); margin-top: -12px; margin-bottom: 18px; }

.gps-list { font-family: 'Courier New', monospace; font-size: 14px; line-height: 1.9; columns: 2; column-gap: 20px; }
@media (max-width: 480px) { .gps-list { columns: 1; } }

/* ---- forum (dark) ---- */
body.forum-page { background: #17181a; }
.forum-header {
  background: #1e1f22; border-bottom: 1px solid #2b2d30; padding: 12px 20px;
  font-size: 13px; color: #8a8f94;
}
.forum-header a { color: #8a8f94; text-decoration: none; }
.forum-main { max-width: 640px; margin: 0 auto; padding: 20px 16px 60px 16px; color: #d8dadc; }
.forum-sub { font-size: 12px; color: #8a8f94; margin-bottom: 4px; }
.forum-title { font-size: 20px; font-weight: 700; margin: 0 0 4px 0; }
.forum-meta { font-size: 12px; color: #8a8f94; margin-bottom: 16px; }
.forum-post { font-size: 14px; line-height: 1.5; margin-bottom: 20px; }
.forum-comment { font-size: 13.5px; line-height: 1.5; margin-bottom: 12px; padding-left: 12px; border-left: 2px solid #33363a; }
.forum-comment .user { font-weight: 700; color: #e8eaec; }
.forum-comment .t { color: #6d7278; font-size: 11.5px; margin-left: 6px; }
.forum-comment.nested { margin-left: 20px; }
.forum-comment.nested2 { margin-left: 40px; }
.forum-comment.highlight { background: rgba(181,80,46,0.14); border-radius: 4px; padding: 8px 12px; }
.forum-sidebar { margin-top: 30px; border-top: 1px solid #2b2d30; padding-top: 16px; }
.forum-sidebar h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #8a8f94; margin: 16px 0 6px 0; }
.forum-sidebar h4:first-child { margin-top: 0; }
.forum-sidebar .link { color: #9fb3c8; font-size: 13px; margin-bottom: 4px; }

/* ---- submission / reveal ---- */
.submit-title { font-size: 22px; font-weight: 700; text-align: center; margin: 30px 0 24px 0; }
.submit-card { background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 26px 24px; max-width: 420px; margin: 0 auto; }
.submit-label { font-size: 14px; color: #444; margin-bottom: 8px; }
.submit-label .req { color: #c0392b; }
.result-box { display: none; border-radius: 6px; padding: 12px 14px; font-size: 14px; margin-top: 14px; }
.result-box.show { display: block; }
.result-box.correct { background: #eaf6ec; color: #256029; border: 1px solid #bfe3c6; }
.result-box.wrong { background: #fdecea; color: #a33; border: 1px solid #f3c6c2; }

/* ---- newspaper / reveal article ---- */
.article-page main { max-width: 760px; }
.article-kicker { font-family: Georgia, serif; font-weight: 700; color: var(--maroon); letter-spacing: 1px; font-size: 13px; margin-bottom: 4px; }
.article-title { font-family: Georgia, serif; font-size: 26px; font-weight: 700; margin: 0 0 16px 0; border-bottom: 2px solid var(--maroon); padding-bottom: 12px; }
.article-body { font-family: Georgia, serif; font-size: 15px; line-height: 1.65; }
.article-body p { margin: 0 0 14px 0; }
@media (min-width: 640px) { .article-body { columns: 2; column-gap: 28px; } }

/* ---- trace review ---- */
.trace-card { border-left: 3px solid #4a8a4a; background: #f7faf7; padding: 12px 16px; margin-bottom: 14px; border-radius: 0 4px 4px 0; }
.trace-card h3 { margin: 0 0 6px 0; font-size: 15px; }
.trace-card .status { font-weight: 400; color: #4a8a4a; font-size: 12.5px; }
.trace-card p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.trace-card.killer { border: 2px solid #c0392b; background: #fdf0ee; border-left-width: 3px; }
.trace-card.killer h3 { font-size: 17px; color: #c0392b; }
.trace-card.killer .status { color: #c0392b; }

footer.site-footer {
  text-align: center; font-size: 12px; color: #9aa1a6; padding: 20px 0 40px 0;
}

/* --- odgovor po osumnjičenom na formi za predaju rešenja --- */
.result-box.alibi { background: #fdf6e3; color: #7a5c17; border: 1px solid #ecdca8; line-height: 1.55; }
.result-box.unknown { background: #f1f3f5; color: #444; border: 1px solid #d8dce0; line-height: 1.55; }
.result-box.alibi a, .result-box.unknown a { color: #7a1f1f; }
.submit-help { margin-top: 16px; font-size: 13px; color: #777; text-align: center; }
.submit-help a { color: #7a1f1f; }

/* --- stranica sa pomoći --- */
.hint-intro { max-width: 680px; margin: 0 auto 22px auto; font-size: 14px; line-height: 1.6; color: #555; }
.hint-list { max-width: 680px; margin: 0 auto; }
.hint-item { border: 1px solid #e0dcd4; border-radius: 5px; margin-bottom: 10px; background: #fff; }
.hint-item summary {
  cursor: pointer; padding: 12px 16px; font-size: 14.5px; font-weight: 600;
  color: #3a3a3a; list-style: none;
}
.hint-item summary::-webkit-details-marker { display: none; }
.hint-item summary::before { content: "+  "; color: #7a1f1f; font-weight: 700; }
.hint-item[open] summary::before { content: "\2212  "; }
.hint-item .hint-body { padding: 0 16px 14px 16px; font-size: 13.5px; line-height: 1.6; color: #444; }
.hint-item .hint-body p { margin: 0 0 8px 0; }
.hint-level { font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: #999; margin-top: 10px; }
.hint-warning {
  max-width: 680px; margin: 26px auto 0 auto; padding: 12px 16px; font-size: 13.5px;
  background: #fdecea; border: 1px solid #f3c6c2; color: #a33; border-radius: 5px;
}

/* ---- Pomoć: hub sa karticama i nizovi nagoveštaja ---- */
.hint-cards {
  max-width: 900px; margin: 0 auto; display: grid;
  grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.hint-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit; text-align: center;
  border: 1px solid #e0dcd4; border-radius: 6px; background: #fff;
  padding: 0 0 16px 0; overflow: hidden; transition: box-shadow .15s, transform .15s;
}
.hint-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.12); transform: translateY(-2px); }
.hint-card .hc-img { background: #ddd; line-height: 0; }
.hint-card .hc-img img { width: 100%; height: auto; display: block; filter: grayscale(.35) contrast(1.05); }
.hint-card .hc-title { font-size: 15px; font-weight: 700; color: #2c2c2c; margin: 14px 14px 4px 14px; }
.hint-card .hc-desc { font-size: 12.5px; color: var(--muted); margin: 0 14px 14px 14px; line-height: 1.45; }
.hint-card .hc-btn {
  display: inline-block; margin-top: auto; align-self: center; background: var(--maroon); color: #fff; font-size: 12px;
  letter-spacing: .6px; text-transform: uppercase; padding: 7px 16px; border-radius: 3px;
}
.hint-card.hc-danger { border-color: #d9b4b4; background: #fffafa; }
.hint-card.hc-danger .hc-btn { background: #8a1717; }

.crumb {
  display: block; max-width: 680px; margin: 0 auto 14px auto;
  font-size: 13px; color: var(--maroon); text-decoration: none;
}
.crumb:hover { text-decoration: underline; }

.step { border: 1px solid #e0dcd4; border-radius: 4px; margin-bottom: 8px; background: #fff; overflow: hidden; }
.step summary {
  cursor: pointer; padding: 10px 14px; font-size: 12.5px; font-weight: 700;
  letter-spacing: 1px; color: #fff; background: var(--maroon); list-style: none;
}
.step summary::-webkit-details-marker { display: none; }
.step summary::before { content: "+  "; opacity: .8; }
.step[open] summary::before { content: "\2212  "; }
.step .step-body { padding: 12px 14px; font-size: 13.5px; line-height: 1.65; color: #3d3d3d; }
.step .step-body p { margin: 0; }
.step-warn summary { background: #8a6d1f; }
.step-answer summary { background: #2f2f2f; }
.step-important {
  border: 1px solid #f0c9c4; background: #fdecea; color: #8a1717; border-radius: 4px;
  padding: 12px 14px; font-size: 13px; line-height: 1.6; margin-bottom: 14px; font-weight: 600;
}
.trail-foot {
  max-width: 680px; margin: 22px auto 0 auto; display: flex; justify-content: space-between;
  font-size: 13px; border-top: 1px solid var(--line); padding-top: 12px;
}
.trail-foot a { color: var(--maroon); text-decoration: none; }
.trail-foot a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .hint-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hint-card .hc-title { font-size: 14px; }
}
@media (max-width: 460px) {
  .hint-cards { grid-template-columns: 1fr; }
}
