@font-face {
  font-family: "CMB";
  src:
    local("CMB"),
    url("cmb.otf") format("opentype");
  font-display: swap;
}

:root {
  --bg: #1f3a2f;
  --card: #f9fbf7;
  --text: #1b2b22;
  --muted: #4f6156;
  --border: #cfd8ce;
  --shadow: 0 22px 60px rgba(9, 25, 16, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 420px at 8% 4%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 58%),
    radial-gradient(900px 400px at 96% 96%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 62%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding:
    calc(clamp(10px, 2.4vw, 24px) + env(safe-area-inset-top))
    calc(clamp(10px, 2.4vw, 24px) + env(safe-area-inset-right))
    calc(clamp(10px, 2.4vw, 24px) + env(safe-area-inset-bottom))
    calc(clamp(10px, 2.4vw, 24px) + env(safe-area-inset-left));
}

.app {
  width: min(1120px, 100%);
  height: min(96dvh, 980px);
  height: min(96vh, 980px);
  background: linear-gradient(180deg, #fcfefb 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: clamp(12px, 2vw, 18px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.topRight {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topbarActions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.brandLogo {
  font-family: "CMB", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.buttonLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 850;
  font-size: 13px;
  text-decoration: none;
}

.buttonLink.secondary {
  background: #e8efea;
  color: #183424;
}

.stage {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fdfefa;
  padding: 14px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: grid;
  gap: 12px;
}

.hero {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(145deg, #4d6ea6, #2f4a77);
  color: #f7f9f2;
}

.hero h1 {
  margin: 0 0 8px 0;
  font-size: clamp(24px, 3.3vw, 36px);
  font-family: "CMB", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
}

.hero p {
  margin: 0;
  line-height: 1.5;
  font-weight: 700;
}

.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

.card h2 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-family: "CMB", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
  font-weight: 700;
}

.card p + p {
  margin-top: 12px;
}

.card a {
  color: #1f4f91;
  text-decoration: none;
}

.note {
  background: #f7faf7;
}

.sources {
  font-size: 14px;
}

@media (max-width: 720px) {
  .app {
    height: auto;
    min-height: 100vh;
  }

  .topRight {
    align-items: flex-start;
    flex-direction: column-reverse;
  }
}
