:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --ink: #17302a;
  --muted: #5b7068;
  --line: #e1e9e5;
  --primary: #0e7a5f;
  --primary-dark: #0a5c48;
  --primary-soft: #e2f2ec;
  --warn: #b7791f;
  --warn-soft: #fdf3e0;
  --danger: #b3342e;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20, 45, 38, 0.08), 0 8px 24px rgba(20, 45, 38, 0.06);
}

* { box-sizing: border-box; }

@font-face {
  font-family: "Sora";
  src: url("/fonts/Sora-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/Sora-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Sora", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, .brand-name, .stat-value {
  font-family: "Fraunces", Georgia, serif;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 60px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.brand-name { font-weight: 700; }
.brand-tag {
  color: var(--muted);
  font-size: 13px;
  border-left: 1px solid var(--line);
  padding-left: 10px;
}

.nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.nav a { color: var(--ink); font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--primary); text-decoration: none; }
.inline-form { display: inline; margin: 0; }
.linklike {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.linklike:hover { color: var(--primary); text-decoration: underline; }

.main { padding-top: 24px; padding-bottom: 64px; }

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  padding: 20px 0;
}
.footer p { margin: 0; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card-narrow { max-width: 460px; margin: 24px auto; }
.card-head { margin-bottom: 16px; }
.card-link { display: block; color: inherit; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.card-link:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.cards { display: grid; gap: 14px; }
.card-row { display: flex; align-items: center; gap: 14px; }
.card-row.between { justify-content: space-between; }

.child-avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.stat {
  flex: 1 1 140px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
}
.stat-value { font-size: 22px; font-weight: 700; color: var(--primary-dark); }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 12px; }
.tab {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.tab.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade 0.15s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; } }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef1ef;
  color: var(--muted);
}
.badge-ok { background: var(--primary-soft); color: var(--primary-dark); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }

/* forms */
.stack { display: grid; gap: 8px; margin-top: 14px; }
.stack label { font-weight: 600; font-size: 14px; }
.stack input, .otp-input, .code-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.stack input:focus, .otp-input:focus, .code-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
  border-color: var(--primary);
}
.code-input { letter-spacing: 0.18em; font-weight: 700; text-transform: uppercase; }
.otp-row { display: flex; gap: 10px; align-items: center; }
.otp-input { text-align: center; letter-spacing: 0.3em; font-weight: 700; font-size: 20px; flex: 1; }
.resend { margin-top: 14px; }
.resend .linklike { font-size: 14px; }

/* switches */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.toggle-row p { margin: 2px 0 0; font-size: 13px; }
.switch { position: relative; display: inline-block; width: 48px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cfd9d4;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(22px); }

/* alerts */
.alert { border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 12px 0; }
.alert-error { background: #fdecea; color: var(--danger); border: 1px solid #f5c6c2; }
.alert-ok { background: var(--primary-soft); color: var(--primary-dark); border: 1px solid #b8dfd0; }

/* hero / landing */
.hero {
  background: linear-gradient(150deg, #0a5c48, #0e7a5f 55%, #18a37f);
  color: #fff;
  border-radius: 20px;
  padding: 48px 32px;
  margin-bottom: 28px;
}
.hero h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.2; }
.hero .lead { margin: 0 0 22px; font-size: 17px; opacity: 0.92; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn-primary { background: #fff; color: var(--primary-dark); }
.hero-actions .btn-primary:hover { background: #e9f6f1; }
.hero-actions .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.hero-actions .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 28px; }
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.feature-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature h3 { margin: 0 0 4px; font-size: 15px; }
.feature p { margin: 0; font-size: 14px; color: var(--muted); }

.how { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.how h2 { margin-top: 0; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 8px; color: var(--muted); }

.muted { color: var(--muted); }
.center { text-align: center; }
.empty { text-align: center; padding: 40px 0; color: var(--muted); }
.empty .btn { margin-top: 12px; }
.term-heading { font-size: 16px; margin: 22px 0 8px; color: var(--primary-dark); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.body { white-space: pre-line; }

@media (max-width: 560px) {
  .brand-tag { display: none; }
  .hero { padding: 32px 20px; }
  .hero h1 { font-size: 24px; }
  .nav { gap: 12px; }
}
