/* Base layout */

@font-face {
  font-family: "Bai Jamjuree";
  src: url("fonts/BaiJamjuree-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bai Jamjuree";
  src: url("fonts/BaiJamjuree-Semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bai Jamjuree";
  src: url("fonts/BaiJamjuree-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body.page {
  min-height: 100vh;
  background-color: #292b2b;
  font-family: "Bai Jamjuree", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #f8f9f9;
}

.page-wrapper {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 24px;
}

/* Hero (image header, like original) */

.hero {
  text-align: center;
  margin-bottom: 16px;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 10px;
}

/* Generic card styles */

.card {
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

.card-banner {
  padding: 12px 12px; /* adds breathing room without breaking mobile */
  text-align: center;
}

.card-banner-alert {
  background-color: #cb333b;
  color: #ffffff;
}

.card-banner-title {
  margin: 0;
  font-weight: 700;

  /* Single continuous scaling curve */
  font-size: clamp(1.05rem, 3.2vw, 1.5rem);

  line-height: 1.25;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  flex-wrap: wrap;
  white-space: normal;

  max-width: 100%;
  min-width: 0;
}

.card-banner-title > span[aria-hidden="true"] {
  flex: 0 0 auto;
}

.card-banner-title > span:not([aria-hidden="true"]) {
  flex: 0 1 auto;
  min-width: 0;
  text-align: center;
}

.card-main {
  background-color: #ffffff;
  color: #000000;
}

.card-learn {
  background-color: #052e66;
  color: #ffffff;
}

.card-why {
  background-color: #4a4e4e;
  color: #ffffff;
}

.card-header {
  padding: 20px 20px 0;
}

.card-header h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.4;
  color: inherit;
}

.card-header .highlight {
  color: #cb333b;
  font-weight: 700;
}

.card-subheading {
  margin: 16px 0 8px;
  font-size: 1.1rem;
  line-height: 1.4;
  font-weight: 700;
  color: inherit;
}

.card-body {
  padding: 16px 20px 20px;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Blocked site box */

.blocked-site {
  margin-bottom: 16px;
}

.blocked-site-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #000000;
  margin-bottom: 6px;
}

.blocked-site-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
}

.blocked-site-url {
  font-family: "Consolas", Menlo, Monaco, "Courier New", monospace;
  font-size: 0.9rem;
  color: #000000;
  word-break: break-all;
  flex: 1;
}

.blocked-site-help {
  margin-top: 8px;
  font-size: 0.9rem;
}

/* Buttons and links */

.icon-button {
  border: none;
  padding: 2px 4px;
  font-size: 1.1rem;
  background: transparent;
  cursor: pointer;
}

.icon-button:focus-visible {
  outline: 2px solid #2fa3e0;
  outline-offset: 2px;
}

.link-button {
  border: none;
  padding: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  color: #2fa3e0;
  text-decoration: underline;
}

.link-button:focus-visible {
  outline: 2px solid #2fa3e0;
  outline-offset: 2px;
}

a {
  color: #2fa3e0;
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background-color: #2fa3e0;
  color: #f8f9f9;
}

.card-actions {
  margin-top: 16px;
}

/* Text blocks */

.lead,
.text-intro,
.card-body p {
  margin: 0 0 8px;
}

.no-action-needed {
  margin-top: 16px;
}

.no-action-needed h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: #000000;
}

.no-action-needed p {
  margin: 0;
}

/* Lists */

.risk-list {
  margin: 0 0 16px 1.2rem;
  padding: 0;
}

.risk-list li {
  margin-bottom: 4px;
  font-size: 0.95rem;
}

/* Legit section */

.legit-section {
  margin-top: 16px;
}

.legit-section h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

/* Footer */

.footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: #ffffff;
}

.footer-logo {
  display: block;
  margin: 0 auto 8px;
}

.footer-text {
  margin: 0;
}

@media (max-width: 640px) {
  .page-wrapper {
    padding: 16px 12px 20px;
  }

  .card-banner-title {
    font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  }

  .card-header,
  .card-body {
    padding-left: 16px;
    padding-right: 16px;
  }
}
