:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --text: #16241c;
  --muted: #5b6b62;
  --primary: #0e7a4e;
  --primary-dark: #075334;
  --border: #e2e0d8;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; }

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

header.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

header.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--primary-dark);
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: #0b1424;
}

.social-links {
  display: flex;
  gap: 16px;
  font-size: 0.95rem;
}

.social-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.social-links a:hover { color: var(--primary); }

.hero {
  padding: 64px 0 48px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 12px;
  color: var(--primary-dark);
}

.hero p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
}

.topics {
  padding: 8px 0 72px;
}

.topics h2 {
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(14, 122, 78, 0.12);
  border-color: var(--primary);
}

.topic-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.topic-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.disclaimer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

.disclaimer strong {
  color: var(--text);
}

/* Topic detail page */
.back-link {
  display: inline-block;
  margin: 32px 0 8px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.topic-detail {
  padding: 8px 0 64px;
}

.topic-detail h1 {
  color: var(--primary-dark);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin-bottom: 8px;
}

.topic-detail .summary {
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 32px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.video-embed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.video-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
}

.video-embed .video-title {
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
}

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(160deg, #0b1424, #123a2b 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gate-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 36px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.gate-logo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  margin-bottom: 16px;
}

.gate-card h1 {
  font-size: 1.3rem;
  margin: 0 0 8px;
  color: var(--primary-dark);
}

.gate-card > p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 20px;
}

#gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#gate-form input[type="text"],
#gate-form input[type="email"] {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-family: inherit;
}

#gate-form input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.gate-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}

#gate-form button {
  margin-top: 4px;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

#gate-form button:hover { background: var(--primary-dark); }
#gate-form button:disabled { opacity: 0.7; cursor: default; }

.gate-error {
  color: #a3271d;
  font-size: 0.85rem;
  min-height: 1em;
}

.gate-privacy {
  margin: 16px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.welcome-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.welcome-list li {
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 14px;
}

#welcome-start {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

#welcome-start:hover { background: var(--primary-dark); }

.share-btn {
  display: inline-block;
  margin-bottom: 28px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.share-btn:hover { border-color: var(--primary); }

.visa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}

.visa-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.visa-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  color: var(--primary-dark);
}

.visa-card p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.visa-card a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.inz-status {
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 24px;
  display: inline-block;
  background: var(--border);
  color: var(--muted);
}

.inz-status--ok {
  background: #e4f3ec;
  color: var(--primary-dark);
}

.inz-status--changed {
  background: #fdecea;
  color: #a3271d;
}

.ask-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 40px;
}

.ask-box h3 {
  margin: 0 0 6px;
  color: var(--primary-dark);
  font-size: 1.05rem;
}

.ask-box > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

#ask-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 480px;
}

#ask-form input[type="text"],
#ask-form input[type="email"],
#ask-form textarea {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

#ask-form input:focus,
#ask-form textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

#ask-form button {
  align-self: flex-start;
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
}

#ask-form button:hover { background: var(--primary-dark); }
#ask-form button:disabled { opacity: 0.7; cursor: default; }

.ask-msg { font-size: 0.85rem; min-height: 1em; }
.ask-msg--ok { color: var(--primary-dark); }
.ask-msg--error { color: #a3271d; }

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}

.empty-state a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
