:root {
  --bg: #f2f7f3;
  --surface: #ffffff;
  --ink: #0c1f13;
  --muted: #5d7766;
  --brand: #09571c;   /* primary green (rgb 9,87,28) */
  --brand-dark: #064112;
  --brand-deep: #031b09;  /* header / footer green */
  --accent: #2eae58;
  --border: #d3e4da;
  --ok: #2f855a;
  --danger: #b23b3b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(12, 31, 19, .08), 0 8px 24px rgba(12, 31, 19, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}

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

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--brand-deep); color: #fff; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 20px; gap: 10px; }
.brand { display: flex; flex-direction: column; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-line { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 28px; width: auto; display: block; border-radius: 4px; }
.brand-badge { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.brand-sub { font-size: 12px; color: #8fd6a8; }
.nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: #d8ece0; }
.nav a { color: #d8ece0; }
.nav a:hover { color: var(--accent); text-decoration: none; }
.inline { display: inline; }
.link-button { background: none; border: none; color: #d8ece0; cursor: pointer; font: inherit; padding: 0; }
.link-button:hover { color: var(--accent); }

.phase-banner { background: #e9f6ee; border-bottom: 1px solid var(--border); color: #1f5c37; font-size: 14px; padding: 8px 0; }
.phase-banner.phase-open { background: #e9f6ee; }
.phase-detail { opacity: .8; }
.pill {
  display: inline-block; background: #dff3e4; color: #09571c; border-radius: 999px;
  padding: 2px 10px; font-size: 12px; font-weight: 600; margin-right: 6px;
}
.pill-muted { background: #e4ede7; color: #4f6b5a; }
.pill-danger { background: #f8d6d6; color: #8a1f1f; }

/* ---------- Layout ---------- */
.page { padding-top: 10px; padding-bottom: 60px; min-height: 70vh; }
.page-head { margin-bottom: 24px; }
.page-head h1 { margin: 6px 0; font-size: 30px; line-height: 1.2; }
.muted { color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 24px 0; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.card h2 { margin-top: 0; color: var(--brand-dark); }
.card h3 { margin: 0 0 6px; }

.highlight-card { border-color: var(--accent); background: #eaf8ee; }
.notice { background: #e8f6ed; border: 1px solid #bfe0cd; border-radius: var(--radius); padding: 12px 16px; margin: 12px 0; }
.notice.info, .notice.success { background: #e9f6ee; border-color: #b9dcc6; }
.notice.success strong { color: var(--ok); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 9px 16px; border-radius: 9px; font-weight: 600; font-size: 14px;
  border: 1px solid var(--border); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none;
}
.btn:hover { text-decoration: none; background: #f0f7f2; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; }
.btn-danger { background: #b23b3b; border-color: #b23b3b; color: #fff; }
.btn-danger:hover { background: #8f2626; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.link-button { font-size: 14px; }

.inline-form { display: inline-flex; gap: 8px; align-items: center; }
.card-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-card { max-width: 720px; }
.auth-wrap { display: flex; justify-content: center; }
.auth-card { max-width: 620px; width: 100%; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 4px; font-size: 14px; }
.req { color: var(--danger); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=url], .field input[type=number],
.field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
  font: inherit; background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.help { color: var(--muted); font-size: 12.5px; display: block; margin-top: 4px; }
.error { color: var(--danger); font-size: 13px; display: block; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; align-items: center; }

.role-picker label { margin-bottom: 8px; }
.role-options { display: grid; gap: 10px; }
.role-option { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; cursor: pointer; background: #f0f8f2; }
.role-option:has(input:checked) { border-color: var(--brand); background: #e0f4e6; }
.role-option strong { font-size: 14px; }
.role-option small.help { margin-top: 2px; }

.filters { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.filters select, select.score-select { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border); font: inherit; }
.filters input[type=search] { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border); font: inherit; background: #fff; color: var(--ink); }

/* ---------- Lists / rows ---------- */
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.sub-row { padding: 8px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }

.problem-list { display: grid; gap: 16px; }
.problem-card h2 { margin: 6px 0; }
.problem-card h2 a { color: var(--ink); }
.problem-card h2 a:hover { color: var(--brand-dark); }
.problem-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }

.qa dt { font-weight: 700; margin-top: 14px; font-size: 14px; color: var(--brand-dark); }
.qa dd { margin: 4px 0 0; }
.qa dt:first-child { margin-top: 0; }

/* ---------- Hero & steps ---------- */
.hero { text-align: center; padding: 10px 0; }
.hero h1 { font-size: 40px; line-height: 1.15; margin-bottom: 12px; }
.hero h1 .accent { color: var(--brand); }
.hero p { max-width: 720px; margin: 0 auto 20px; font-size: 17px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 26px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 30px; color: var(--brand-dark); }
.hero-stats span { color: var(--muted); font-size: 13px; }

blockquote { border-left: 4px solid var(--accent); margin: 14px 0; padding: 6px 16px; color: #3d5c49; font-style: italic; }
.column { display: flex; flex-direction: column; }
.dash-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

/* ---------- DISC process flow diagram ---------- */
.disc-flow {
  --f1:#2563eb; --f1-bg:#eaf1ff;
  --f2:#1a7a4c; --f2-bg:#eaf7ef;
  --f3:#6d28d9; --f3-bg:#f2ecfd;
  --f4:#d9670b; --f4-bg:#fdf0e3;
  --f5:#0f8a8a; --f5-bg:#e6f7f7;
  --f6:#b8860b; --f6-bg:#fdf6e3;
  --f7:#be185d; --f7-bg:#fce9f2;
  --f8:#1d4ed8; --f8-bg:#e9eefd;
  --f9:#15803d; --f9-bg:#eaf6ee;
  --ink:#031b09;
  max-width: 100%; margin: 0 auto 26px;
}
.flow-masthead {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: var(--ink); color: #fff; padding: 20px 40px; border-radius: 14px;
  width: fit-content; margin: 0 auto 8px;
}
.flow-masthead .flow-rocket { font-size: 28px; }
.flow-masthead h1 { margin: 0; font-size: 26px; letter-spacing: .5px; font-weight: 800; }
.flow-masthead .flow-spark { font-size: 20px; opacity: .9; }
.flow-subtitle { text-align: center; color: #5b6472; font-size: 14px; margin: 14px 0 28px; }

.flow-row { display: flex; align-items: stretch; justify-content: center; flex-wrap: wrap; gap: 6px 0; }
.flow-stage {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  background: var(--bg, #fff); border: 2px solid var(--accent, #333);
  border-radius: 12px; padding: 14px 16px; flex: 1 1 0; min-width: 0;
  color: var(--ink); margin: 4px 0;
}
.flow-head {
  display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left;
}
.flow-head h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--accent, #333); line-height: 1.2; }
.flow-icon {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: var(--accent, #333); color: #fff;
}
.flow-stage p { margin: 0; font-size: 12px; color: #3c4451; line-height: 1.3; text-align: left; }
.flow-arrow {
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-size: 22px; padding: 0 6px; flex: 0 0 auto;
  min-width: 0;
}
.flow-divider { width: 100%; display: flex; justify-content: center; margin: 5px 0; }
.flow-phase-label {
  text-align: center; font-size: 11px; letter-spacing: 1px; color: #8b93a1;
  margin-bottom: 14px; font-weight: 700; text-transform: uppercase;
}

@media (max-width: 900px) {
  .flow-row { flex-direction: column; align-items: center; }
  .flow-arrow { transform: rotate(90deg); padding: 8px 0; }
  .flow-stage { max-width: 340px; width: 100%; flex: none; text-align: center; align-items: center; }
  .flow-stage .flow-head { justify-content: center; }
  .disc-flow .flow-stage h3, .disc-flow .flow-stage p { text-align: center !important; }
}

.pathway { font-weight: 600; line-height: 2; }
.pathway li::marker { color: var(--brand); }

.phase-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 20px 0; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); }
.step-num { display: inline-block; width: 28px; height: 28px; line-height: 28px; text-align: center;
  border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 8px; }
.step h3 { margin: 0 0 4px; font-size: 15px; }
.step p { font-size: 13px; color: var(--muted); margin: 0; }

.penta { background: #ffffff; border-radius: var(--radius); padding: 26px; margin: 20px 0; }
.penta-image { text-align: center; margin: 18px 0; }
.penta-image img { max-width: 50%; height: auto; }

/* ---------- Feedback loop ---------- */
.feedback-item { border-left: 3px solid var(--border); padding: 8px 0 8px 16px; margin-bottom: 14px; }
.feedback-meta { font-size: 13px; color: var(--muted); }
.feedback-question { background: #edf7ee; border: 1px solid #c3e2cc; border-radius: 8px; padding: 8px 12px; margin-top: 8px; }
.feedback-reply { background: #eef6ee; border: 1px solid #bfdcbf; border-radius: 8px; padding: 8px 12px; margin-top: 6px; }

/* ---------- Score board ---------- */
.score-board { background: #f0f8f2; }
.score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; text-align: center; }
.score-grid strong { display: block; font-size: 30px; color: var(--brand-dark); }
.score-grid span { color: var(--muted); font-size: 13px; }
.score-total strong { font-size: 34px !important; color: var(--ok) !important; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
.kpi { background: #eef7f0; border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-align: center; }
.kpi strong { font-size: 24px; color: var(--brand-dark); display: block; }
.kpi span { font-size: 12px; }
.kpi small { color: var(--muted); }
.kpi-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 12px; margin: 12px 0; }
.kpi-form label { display: flex; flex-direction: column; font-size: 13px; gap: 4px; font-weight: 600; }
.kpi-form input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; width: 100%; }

.messages { margin-bottom: 8px; }
.message { padding: 12px 16px; border-radius: 9px; margin-bottom: 8px; font-size: 14px; }
.message-success { background: #e9f6ee; border: 1px solid #b9dcc6; color: #1f5c37; }
.message-error { background: #fbeaea; border: 1px solid #ecc5c5; color: #8a1f1f; }
.message-warning { background: #eef7f0; border: 1px solid #bfe0cd; color: #1f5c37; }
.message-info { background: #e9f1fb; border: 1px solid #c0d4ec; color: #1f4e7a; }

.footer { background: var(--brand-deep); color: #d8ece0; padding: 26px 0; margin-top: 40px; }
.footer p { margin: 6px 0; }
.footer strong { color: #fff; }
.footer .muted { color: #7d9686; }

@media (max-width: 820px) {
  .grid-2, .grid-3, .phase-steps { grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 30px; }
}