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

:root {
  --bg:         #f0efeb;
  --card:       #ffffff;
  --card-inner: #f7f6f2;
  --border:     #dddbd3;
  --border-dark:#c2c0b8;
  --text:       #1c1b18;
  --muted:      #6b6a64;
  --subtle:     #a09e96;
  --green:      #2d6a2f;
  --green-bg:   #e6f4e6;
  --green-mid:  #9acc9b;
  --green-text: #1a4a1b;
  --track:      #e8e6df;
  --thumb:      #ffffff;
}

html, body {
  min-height: 100%;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 2rem 1rem;
}

.page {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0.25rem;
}

.site-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.secure-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--subtle);
}

/* ── CAPTCHA CARD ── */
.captcha-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: opacity 0.4s, transform 0.4s;
}

.captcha-card.hidden {
  display: none;
}

/* Strip */
.card-strip {
  background: var(--card-inner);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bot-wrap {
  flex-shrink: 0;
  width: 48px; height: 48px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-wrap svg { width: 28px; height: 28px; }

.strip-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.strip-text p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* Body */
.card-body { padding: 1.25rem 1.5rem 1.5rem; }

.instruction {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1.1rem;
  padding: 10px 12px;
  background: var(--card-inner);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.instruction-num {
  flex-shrink: 0;
  width: 18px; height: 18px;
  background: var(--text);
  color: var(--card);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.instruction p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.instruction p strong { color: var(--text); font-weight: 500; }

/* Slider */
.slider-wrap { user-select: none; touch-action: none; }

.slider-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--subtle);
  margin-bottom: 7px;
}

.slider-track {
  position: relative;
  width: 100%;
  height: 56px;
  background: var(--track);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  cursor: default;
}

.slider-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 54px;
  background: var(--card-inner);
  border-right: 1px solid var(--border);
}

.slider-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
  transition: opacity 0.2s;
}

.slider-hint.hide { opacity: 0; }

.chev { display: flex; gap: 2px; align-items: center; }
.chev span {
  display: block;
  width: 7px; height: 7px;
  border-right: 2px solid var(--border-dark);
  border-top: 2px solid var(--border-dark);
  transform: rotate(45deg);
}
.chev span:nth-child(1) { opacity: 0.25; }
.chev span:nth-child(2) { opacity: 0.55; }
.chev span:nth-child(3) { opacity: 1; }

.slider-thumb {
  position: absolute;
  left: 3px; top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: var(--green);
  border: none;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transition: background 0.3s, box-shadow 0.2s;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(45,106,47,0.35);
}

.slider-thumb:active { cursor: grabbing; }
.slider-thumb.dragging { box-shadow: 0 2px 12px rgba(45,106,47,0.5); }
.slider-thumb.done { background: var(--green); box-shadow: 0 2px 8px rgba(45,106,47,0.35); border: none; }

.slider-thumb svg { color: #fff; }

.th-lines { display: flex; flex-direction: column; gap: 4px; }
.th-lines span { display: block; width: 17px; height: 2px; background: var(--muted); border-radius: 1px; }
.th-lines.gone { display: none; }
.th-check { display: none; color: #fff; font-size: 20px; font-weight: 600; }
.th-check.show { display: block; }

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}

.status-indicator {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--border-dark);
  transition: background 0.4s, border-color 0.4s;
}
.status-indicator.ok { background: var(--green); border-color: var(--green); }

.btn-retry {
  font-family: inherit;
  font-size: 11px; font-weight: 500;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-retry:hover { border-color: var(--border-dark); color: var(--text); }

/* Card footer */
.card-footer {
  padding: 0.8rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--card-inner);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand { font-size: 11px; color: var(--subtle); }
.footer-brand b { font-weight: 600; color: var(--muted); }

.footer-links { display: flex; gap: 12px; }
.footer-links a {
  font-size: 11px; color: var(--subtle);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--muted); }

/* ── CONTENT CARD ── */
.content-card {
  display: none;
  flex-direction: column;
  gap: 10px;
}
.content-card.show { display: flex; }

.action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  background: #1a56a0;
  border: none;
  border-radius: 4px;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.01em;
  transition: background 0.15s;
}
.action-btn:hover { background: #154a8e; }
.action-btn:active { background: #0f3a70; }

.below-note {
  font-size: 11px;
  color: var(--subtle);
  text-align: center;
  line-height: 1.6;
}