:root {
  --page: #f7f8fb;
  --card: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --text: #0f172a;
  --muted: #667085;
  --border: #e5e7eb;
  --accent: #f1c21b;
  --radius: 16px;
  --shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  margin: 0;
  background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.04), transparent 32%),
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.05), transparent 26%),
    var(--page);
  color: var(--text);
  line-height: 1.6;
  padding: 32px 16px 64px;
}

header {
  max-width: 1200px;
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.branding {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(120deg, #ffffff 0%, #f7f9ff 70%, #eef2ff 100%);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  border: 1px solid #e3e8f4;
}

.flag {
  width: 64px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.flag-wrap {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  font-weight: 700;
  font-size: 12px;
}

h1 {
  margin: 6px 0;
  font-size: 30px;
}

.lede {
  margin: 0;
  color: var(--muted);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.badge, .pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #e0e7ff;
  color: #312e81;
  box-shadow: none;
}

.pill {
  background: #e2e8f0;
  color: #0f172a;
}

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  background: #e0ecff;
  color: #0f172a;
  border: 1px solid #cdddfc;
}

.tag.subtle {
  background: #f5f7fb;
  border-color: #e5e7eb;
  color: var(--muted);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

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

.input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0 6px;
}

.input-grid.four-cols {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.input-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: var(--text);
}

input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
  background: #f9fafb;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.2);
}

button {
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 14px 32px rgba(31, 111, 235, 0.35);
  border: 1px solid #1c5fce;
}

button:active {
  transform: translateY(1px);
}

.checkbox-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}

.checkbox-row input {
  width: auto;
  accent-color: var(--primary);
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 12px;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.table-wrapper th,
.table-wrapper td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
}

.table-wrapper th {
  background: #f6f8ff;
  font-size: 14px;
}

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

.stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #f9fbff;
  box-shadow: var(--shadow-soft);
}

.stat h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.stat p {
  margin: 0;
  color: var(--muted);
}

.totals {
  margin-top: 12px;
}

.rules {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.rules li {
  margin-bottom: 6px;
}

@media (max-width: 768px) {
  body {
    padding: 18px 12px 42px;
    background: var(--page);
  }

  header {
    margin-top: 6px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    color: var(--muted);
  }

  .badge, .pill {
    background: #eef2ff;
    color: #312e81;
    border: 1px solid #e0e7ff;
    box-shadow: none;
  }

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

  .cta-stack {
    align-items: flex-start;
  }
}

.hint {
  margin: 6px 0 0;
  color: var(--muted);
}

footer {
  max-width: 1200px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 680px) {
  h1 {
    font-size: 24px;
  }

  button.primary {
    width: 100%;
  }
}
