:root {
  --green: #0d3d36;
  --petrol: #105d5b;
  --orange: #e77b22;
  --bg: #f3f6f4;
  --line: #d8e0dc;
  --text: #1c2926;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  min-height: 78px;
  background: var(--green);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px 28px;
}

header strong { display: block; font-size: 18px; }
header span { color: #cfe3dc; font-size: 14px; }

nav { display: flex; gap: 10px; flex-wrap: wrap; }
nav button, nav a {
  background: transparent;
  color: white;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
}
nav button:hover, nav a:hover { background: rgba(255,255,255,.12); }

main {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto;
}

h1, h2, h3 { margin-top: 0; letter-spacing: 0; }

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(20, 40, 36, .06);
}

.narrow { max-width: 680px; }
.wide { overflow-x: auto; }

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

.tile {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.tile b {
  display: block;
  color: var(--petrol);
  font-size: 34px;
}

.stack { display: grid; gap: 14px; }

label { display: grid; gap: 6px; font-weight: 700; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; }

input, textarea, select {
  width: 100%;
  border: 1px solid #bdcbc5;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  background: white;
}

textarea { min-height: 96px; }

button, .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 6px;
  padding: 11px 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary { background: var(--orange); color: white; }
.secondary { background: var(--petrol); color: white; }
.ghost { background: #edf3f0; color: var(--green); }

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th { background: #eaf0ed; }

.notice {
  background: #fff8e8;
  border: 1px solid #f1d29f;
  border-radius: 6px;
  padding: 12px;
}

.error {
  background: #feecea;
  border: 1px solid #e8b4ae;
  color: #82251d;
  border-radius: 6px;
  padding: 12px;
}

.exam {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}

.exam-tools {
  position: sticky;
  top: 16px;
  align-self: start;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.question {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 16px;
}

.qmeta {
  color: var(--petrol);
  font-weight: 700;
  margin-bottom: 8px;
}

.answer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-top: 10px;
  font-weight: 400;
  cursor: pointer;
}

.answer input { width: 22px; height: 22px; flex: 0 0 auto; }
.answer:hover { border-color: var(--petrol); background: #f7faf9; }

.pass { color: #116345; font-weight: 700; }
.fail { color: #9a2e23; font-weight: 700; }

.pdf-frame {
  width: 100%;
  height: 78vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

@media (max-width: 850px) {
  header { flex-direction: column; align-items: flex-start; }
  .exam { grid-template-columns: 1fr; }
  .exam-tools { position: static; }
}
