:root {
  /* Base (light) */
  --page-bg: #f6f8fc;
  --page-bg-2: #eef3fb;

  --text: #0f172a;
  /* slate-900 */
  --muted: #475569;
  /* slate-600 */
  --muted-2: #64748b;
  /* slate-500 */

  --card: #ffffff;
  --margin: 25px;
  --border: #d9e2f2;
  --line-height: 1.5;
  /* light blue-gray */
  --border-2: #c9d6ee;

  --field: #ffffff;
  --field-border: #d3deef;
  --field-border-focus: #9db7e8;

  --accent: #2f6fec;
  /* blue */
  --accent-soft: rgba(47, 111, 236, .10);
  --accent-soft-2: rgba(47, 111, 236, .18);

  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-2: 0 18px 55px rgba(15, 23, 42, .10);

  /* Dropdown */
  --dd-bg: #ffffff;
  --dd-border: #d5def0;
  --dd-hover: rgba(15, 23, 42, .045);
  --dd-active: rgba(47, 111, 236, .10);
  --dd-text: #0f172a;

  /* Radii */
  --r-card: 18px;
  --r-field: 14px;
  --r-dd: 12px;

  /* Fonts */
  --font-ui: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-num: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-weight: 650;
}

* {
  box-sizing: border-box;
}

/* topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  margin-bottom: 2.5%;
}

.topbarInner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbarLink {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
}

.topbarLink:hover {
  color: #2f6fec;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 16px;
  color: #0f172a;
}

.logoIcon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f6fec, #6d8cff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 14px;
}

.topbarNav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.topbarNav a {
  color: inherit;
  text-decoration: none;
}

.topbarNav a:hover {
  color: #2f6fec;
}

/* topbar end*/

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);

  /* base very light tint */
  background: linear-gradient(180deg, #f7f9ff 0%, #f3f6ff 45%, #f7f9ff 100%);

  /* allow pseudo elements to sit behind content */
  position: relative;
  isolation: isolate;

  /* avoid showing a hard line on the side */
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}

/* Big soft halos */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;

  background:
    radial-gradient(900px 520px at 18% 8%, rgba(56, 189, 248, .20), transparent 60%),
    radial-gradient(820px 520px at 55% 0%, rgba(167, 139, 250, .18), transparent 62%),
    radial-gradient(900px 620px at 92% 20%, rgba(56, 189, 248, .16), transparent 62%),
    radial-gradient(780px 520px at 30% 78%, rgba(167, 139, 250, .10), transparent 65%);
  filter: blur(10px);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background-image:
    radial-gradient(circle at 1px 1px, rgba(15, 23, 42, .035) 1px, transparent 0);
  background-size: 18px 18px;
  opacity: .25;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding-inline: clamp(15px, 20px, 25px);
  flex: 1;
}

/* Header */
.header {
  margin: 8px 0 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

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

.title {
  font-size: 22px;
  font-weight: var(--font-weight);
  margin: 0;
  line-height: var(--line-height);
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: var(--line-height);
  max-width: none;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-top: var(--margin);
  margin-bottom: var(--margin);
}

.result-card {
  border: 4px solid var(--border);
}

/* Section heading used in tables/cards */
.sectionTitle {
  font-size: 14px;
  font-weight: var(--font-weight);
  margin: 0 0 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sectionHint {
  font-size: 11px;
  color: var(--muted-2);
  font-weight: var(--font-weight);
  white-space: nowrap;
}

/* Layout */
.grid {
  display: grid;
  gap: 14px;
}

.row {
  display: grid;
  gap: 6px;
}

.label {
  font-size: 12px;
  color: var(--muted-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 18px;
}

.ddHint {
  font-size: 11px;
  color: var(--muted-2);
  font-weight: var(--font-weight);
  margin-left: 10px;
  white-space: nowrap;
}

/* Fields */
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: var(--r-field);
  padding: 10px 12px;
  position: relative;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}

.disabled-field {
  background: #f3f6fd;
  /* grey-blue pill */
}

.field:focus-within {
  border-color: var(--field-border-focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 236, .10);
}

.valueText {
  width: 100%;
  color: var(--text);
  font-size: 18px;
  font-weight: var(--font-weight);
  line-height: var(--line-height);
  min-width: 0;

  /* numbers: use numeric font */
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

.field input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  font-weight: var(--font-weight);
  min-width: 0;

  /* numbers: use numeric font */
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

/* Remove number spinners (if any) */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

.field input[disabled] {
  color: rgba(15, 23, 42, .85);
  -webkit-text-fill-color: rgba(27, 52, 110, 0.85);
  opacity: 1;
}

.suffix {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: var(--font-weight);
  white-space: nowrap;
}

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 23, 42, .10), transparent);
  margin: 14px 0;
}

/* Dropdown (more standard grey-blue) */
.dd {
  position: relative;
  flex: 0 0 auto;
  z-index: 10;
}

.ddBtn {
  border: 1px solid var(--dd-border);
  background: #f3f6fd;
  /* grey-blue pill */
  color: #1f2a44;
  padding: 8px 12px;
  border-radius: var(--r-field);
  font-size: 12px;
  font-weight: var(--font-weight);
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  white-space: nowrap;
  line-height: var(--line-height);

  transition: background .12s ease, border-color .12s ease, transform .08s ease;
}

.ddBtn:hover {
  background: #eef3ff;
  border-color: #c7d6f5;
}

.ddBtn:active {
  transform: scale(.99);
}

.ddBtn .chev {
  opacity: .9;
  font-size: 11px;
  margin-left: 2px;
}

.ddMenu {
  position: absolute;
  right: 0;
  min-width: 200px;
  background: var(--dd-bg);
  border: 1px solid var(--dd-border);
  border-radius: var(--r-dd);
  box-shadow: var(--shadow-2);
  padding: 6px;
  display: none;
  z-index: 999;
}

.dd.open .ddMenu {
  display: block;
}

.ddItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 10px;
  border-radius: 10px;
  color: var(--dd-text);
  font-size: 13px;
  font-weight: var(--font-weight);
  cursor: pointer;
  border: 1px solid transparent;
}

.ddItem:hover {
  background: var(--dd-hover);
  border-color: rgba(15, 23, 42, .06);
}

.ddItem.active {
  background: var(--dd-active);
  border-color: rgba(47, 111, 236, .25);
}

/* Province dropdown */
.provinceDD .ddBtn {
  padding: 7px 12px;
  font-size: 20px;
}

.provinceDD .ddBtn:hover {
  background: rgba(47, 111, 236, .14);
  border-color: rgba(47, 111, 236, .35);
}

.provinceDD .ddMenu {
  min-width: 260px;
  left: 0;
  right: auto;
}

/* Tables */
.tablesGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 820px) {
  .tablesGrid {
    grid-template-columns: 1fr 1fr;
  }
}

.tableBox {
  border: 1px solid var(--border);
  background: #fbfcff;
  border-radius: 16px;
  overflow: hidden;
}

.tableHead {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.tableTitle {
  font-weight: var(--font-weight);
  font-size: 13px;
  color: var(--text);
}

.tableSub {
  font-size: 11px;
  color: var(--muted-2);
  font-weight: var(--font-weight);
  white-space: nowrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-weight: var(--font-weight);
  background: #f7f9fe;
}

td {
  color: rgba(15, 23, 42, .88);
  font-weight: 650;
}

tr:last-child td {
  border-bottom: none;
}

/* Footer note */
.footerNote {
  margin-top: 15px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
  line-height: var(--line-height);
}

/* Misc: nicer bold in descriptions */
.subtitle b,
.card b {
  font-weight: var(--font-weight);
  color: var(--text);
}

/* Footer */
.footer {
  background: #ffffff;
}

.footerInner {
  padding: 18px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #64748b;
}

.footerNav a {
  color: #475569;
  text-decoration: none;
  font-weight: var(--font-weight);
}

.footerNav a:hover {
  color: #2f6fec;
}