/* Detection Lab — LinkedIn/Twitter-like platform styling */

:root {
  --bg-primary: #f3f2ef;
  --bg-card: #ffffff;
  --text-primary: #191919;
  --text-secondary: #666666;
  --text-muted: #999999;
  --accent: #0a66c2;
  --accent-hover: #004182;
  --border: #e0e0e0;
  --success: #057642;
  --warning: #b24020;
  --danger: #cc1016;
  --radius: 8px;
  --shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);
}

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

body {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
}

/* --- Layout --- */
.lab-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.lab-header__logo {
  font-weight: 600;
  font-size: 20px;
  color: var(--accent);
  text-decoration: none;
}

.lab-header__nav {
  display: flex;
  gap: 8px;
  list-style: none;
}

.lab-header__nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  transition: background 0.15s;
}

.lab-header__nav a:hover {
  background: var(--bg-primary);
  color: var(--accent);
}

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

.lab-container {
  max-width: 600px;
  margin: 24px auto;
  padding: 0 16px;
}

.lab-container--wide {
  max-width: 900px;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.card__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card__subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(10, 102, 194, 0.15);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: white;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn--secondary:hover {
  background: rgba(10, 102, 194, 0.08);
}

.btn--small {
  padding: 4px 12px;
  font-size: 12px;
}

.btn--icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
}

.btn--icon:hover {
  background: var(--bg-primary);
}

/* --- Feed --- */
.feed-post {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  padding: 16px 20px;
}

.feed-post__author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.feed-post__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
}

.feed-post__name {
  font-weight: 600;
  font-size: 14px;
}

.feed-post__title {
  font-size: 12px;
  color: var(--text-secondary);
}

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

.feed-post__body {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feed-post__actions {
  display: flex;
  gap: 4px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.feed-post__action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.feed-post__action:hover {
  background: var(--bg-primary);
  color: var(--accent);
}

/* --- Profile --- */
.profile-banner {
  height: 180px;
  background: linear-gradient(135deg, var(--accent), #004182);
  border-radius: var(--radius) var(--radius) 0 0;
}

.profile-header {
  position: relative;
  padding: 0 24px 16px;
  background: var(--bg-card);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid white;
  background: var(--border);
  margin-top: -60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--text-muted);
}

.profile-name {
  font-size: 24px;
  font-weight: 700;
  margin-top: 8px;
}

.profile-headline {
  font-size: 16px;
  color: var(--text-secondary);
}

.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
}

.profile-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.profile-tab:hover,
.profile-tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* --- Article / Long scroll --- */
.article {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

.article__title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.article__meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.article__body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article__body p {
  margin-bottom: 16px;
}

.article__body h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
}

.article__body img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 16px 0;
}

/* --- Report / Scores --- */
.score-overall {
  text-align: center;
  padding: 32px;
}

.score-number {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
}

.score-number--pass {
  color: var(--success);
}

.score-number--marginal {
  color: var(--warning);
}

.score-number--fail {
  color: var(--danger);
}

.score-verdict {
  font-size: 18px;
  font-weight: 600;
  margin-top: 8px;
}

.score-signal {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.score-signal:last-child {
  border-bottom: none;
}

.score-signal__name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}

.score-signal__weight {
  width: 60px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.score-signal__bar {
  width: 200px;
  height: 8px;
  background: var(--bg-primary);
  border-radius: 4px;
  margin: 0 12px;
  overflow: hidden;
}

.score-signal__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.score-signal__fill--pass {
  background: var(--success);
}

.score-signal__fill--marginal {
  background: var(--warning);
}

.score-signal__fill--fail {
  background: var(--danger);
}

.score-signal__value {
  width: 50px;
  text-align: right;
  font-weight: 600;
  font-size: 14px;
}

/* --- Data exposure --- */
.exposure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.exposure-item {
  padding: 12px;
  background: var(--bg-primary);
  border-radius: var(--radius);
}

.exposure-item__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.exposure-item__value {
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-all;
}

/* --- Dashboard --- */
.challenge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.challenge-card {
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, transform 0.15s;
}

.challenge-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.challenge-card__icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.challenge-card__name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.challenge-card__desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* --- Navigation between challenges --- */
.challenge-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-top: 16px;
}

/* --- Utility --- */
.text-center {
  text-align: center;
}

.mt-16 {
  margin-top: 16px;
}

.mb-16 {
  margin-bottom: 16px;
}

.text-muted {
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.badge--pass {
  background: rgba(5, 118, 66, 0.1);
  color: var(--success);
}

.badge--fail {
  background: rgba(204, 16, 22, 0.1);
  color: var(--danger);
}

.badge--warn {
  background: rgba(178, 64, 32, 0.1);
  color: var(--warning);
}
