:root {
  --green: #1d5c3a;
  --green-dark: #123f27;
  --green-light: #e8f3ec;
  --gold: #b98c2f;
  --ink: #222b26;
  --muted: #5f6f66;
  --bg: #f7faf8;
  --card: #ffffff;
  --border: #d9e4dd;
  --red: #a33a2e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
.wrap { max-width: 880px; margin: 0 auto; padding: 0 1.25rem; }
h1, h2, h3, h4 { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--green-dark); line-height: 1.25; }
a { color: var(--green); }
code { background: var(--green-light); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.95em; }

/* header/footer */
.site-header { background: var(--green-dark); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.brand { color: #fff; text-decoration: none; font-family: 'Segoe UI', system-ui, sans-serif; font-weight: 600; font-size: 1.05rem; }
.site-header nav { display: flex; align-items: center; gap: 1rem; }
.site-header nav a { color: #dcebe2; text-decoration: none; font-family: 'Segoe UI', system-ui, sans-serif; font-size: 0.95rem; }
.site-footer { margin-top: 3rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--muted); }

/* buttons & forms */
.btn {
  display: inline-block; background: var(--green); color: #fff !important; border: none;
  padding: 0.6rem 1.3rem; border-radius: 6px; font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--green-dark); }
.btn-lg { font-size: 1.15rem; padding: 0.75rem 1.7rem; }
.btn-sm { font-size: 0.85rem; padding: 0.35rem 0.9rem; }
.btn-ghost { background: transparent; color: var(--green) !important; border: 2px solid var(--green); }
.linklike { background: none; border: none; color: #dcebe2; font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
main .linklike { color: var(--green); }
form.inline { display: inline; }
label { display: block; margin: 0.8rem 0; font-family: 'Segoe UI', system-ui, sans-serif; font-weight: 600; font-size: 0.92rem; }
input {
  display: block; width: 100%; margin-top: 0.25rem; padding: 0.55rem 0.7rem;
  border: 1px solid var(--border); border-radius: 6px; font-size: 1rem; font-family: inherit;
}
input:focus { outline: 2px solid var(--green); border-color: var(--green); }
.muted { color: var(--muted); font-weight: 400; }
.error { background: #fbeae7; color: var(--red); padding: 0.6rem 0.9rem; border-radius: 6px; }

/* layout pieces */
.hero { padding: 2.5rem 0 1rem; }
.hero h1 { font-size: 1.9rem; }
.lead { font-size: 1.12rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem 1.3rem; margin: 1rem 0; }
.cards .card { margin: 0; }
.authbox { max-width: 420px; margin: 2.5rem auto; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem 1.8rem 1.8rem; }
.progressbar { height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; margin: 0.75rem 0 0.25rem; }
.progressbar div { height: 100%; background: var(--green); transition: width 0.3s; }
.module-list { list-style: none; padding: 0; }
.module-row { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--border); font-family: 'Segoe UI', system-ui, sans-serif; }
.module-row a { text-decoration: none; font-weight: 600; flex: 1; }
.module-row.done a { color: var(--muted); }
.pass-banner { background: var(--green-light); border-color: var(--green); }
.fail-banner { background: #fbeae7; border-color: var(--red); }
.fail-banner h1 { color: var(--red); }

/* module article */
article.module { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem 2rem; }
article.module ul { padding-left: 1.3rem; }
article.module li { margin: 0.45rem 0; }

/* exam */
.question { border: 1px solid var(--border); background: var(--card); border-radius: 10px; padding: 1rem 1.3rem; margin: 1rem 0; }
.question legend { font-family: 'Segoe UI', system-ui, sans-serif; padding: 0 0.4rem; }
.choice { display: block; font-weight: 400; font-family: Georgia, serif; margin: 0.45rem 0; cursor: pointer; }
.choice input { display: inline; width: auto; margin-right: 0.5rem; }
.review li { margin: 0.8rem 0; }
.review .wrong { color: var(--red); }
.review .right { color: var(--green); }

/* admin */
.admin-table { width: 100%; border-collapse: collapse; font-family: 'Segoe UI', system-ui, sans-serif; font-size: 0.9rem; background: var(--card); }
.admin-table th, .admin-table td { border: 1px solid var(--border); padding: 0.5rem 0.7rem; text-align: left; }
.admin-table th { background: var(--green-light); }

/* certificate */
.certificate { background: #fffdf6; margin: 1rem auto; max-width: 820px; }
.cert-border { border: 6px double var(--gold); padding: 2.5rem 3rem; text-align: center; }
.cert-seal { font-size: 2.6rem; margin: 0 0 0.25rem; }
.certificate h1 { font-family: Georgia, serif; font-size: 2.3rem; margin: 0; color: var(--green-dark); letter-spacing: 0.02em; }
.cert-sub { font-family: 'Segoe UI', system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.85rem; color: var(--gold); margin-top: 0.4rem; }
.cert-this { margin: 1.6rem 0 0.2rem; font-style: italic; color: var(--muted); }
.cert-name { font-size: 2rem; font-weight: 700; margin: 0.1rem 0; color: var(--ink); border-bottom: 1px solid var(--gold); display: inline-block; padding: 0 2rem 0.2rem; }
.cert-biz { margin: 0.3rem 0 0; color: var(--muted); }
.cert-body { max-width: 620px; margin: 1.4rem auto; font-size: 0.98rem; }
.cert-meta { display: flex; justify-content: center; gap: 3rem; margin: 1.8rem 0 1rem; font-size: 0.92rem; flex-wrap: wrap; }
.cert-label { font-family: 'Segoe UI', system-ui, sans-serif; text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.12em; color: var(--muted); }
.cert-disclaimer { font-size: 0.72rem; color: var(--muted); margin-top: 1.6rem; }

@media print {
  .no-print, .site-header, .site-footer { display: none !important; }
  body { background: #fff; }
  .wrap { max-width: none; padding: 0; }
  .certificate { margin: 0; max-width: none; }
  .cert-border { border-color: #b98c2f; }
}
