/* Reform UK skills audit — minimal, accessible, mobile-first */
:root {
  --rf-teal: #12B6CF;
  --rf-blue: #0E7490;
  --rf-dark: #0F2937;
  --rf-bg:   #F7FAFC;
  --rf-line: #E2E8F0;
  --rf-text: #1A202C;
  --rf-muted:#4A5568;
  --rf-err:  #C53030;
  --rf-ok:   #2F855A;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--rf-bg);
  color: var(--rf-text);
  line-height: 1.5;
  font-size: 16px;
}

.site-header {
  background: var(--rf-dark);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--rf-teal);
}
.subtitle { font-size: 14px; color: #cbd5e0; }
.admin-nav a {
  color: #fff;
  margin-left: 16px;
  text-decoration: none;
  font-size: 14px;
}
.admin-nav a:hover { text-decoration: underline; }

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

h1 { font-size: 28px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 32px 0 12px; color: var(--rf-blue); border-bottom: 2px solid var(--rf-line); padding-bottom: 6px; }
p.lead { color: var(--rf-muted); margin: 0 0 24px; }

.section { background: #fff; padding: 20px 24px; border: 1px solid var(--rf-line); border-radius: 8px; margin-bottom: 20px; }

.field { margin-bottom: 18px; }
.field label.q { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { color: var(--rf-muted); font-size: 14px; margin-bottom: 6px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rf-line);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--rf-teal);
  border-color: var(--rf-teal);
}
.field .options label {
  display: block;
  padding: 8px 10px;
  border: 1px solid var(--rf-line);
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  background: #fff;
}
.field .options label:hover { background: #EDF2F7; }
.field .options input { margin-right: 8px; }

.required { color: var(--rf-err); }

.btn {
  background: var(--rf-teal);
  color: #fff;
  border: 0;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { background: var(--rf-blue); }
.btn-secondary { background: #fff; color: var(--rf-blue); border: 1px solid var(--rf-blue); }
.btn-danger { background: var(--rf-err); }
.btn-danger:hover { background: #9B2C2C; }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; }
.alert-error { background: #FED7D7; color: var(--rf-err); border: 1px solid #FC8181; }
.alert-ok { background: #C6F6D5; color: var(--rf-ok); border: 1px solid #68D391; }

table.data {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--rf-line);
  border-radius: 8px;
  overflow: hidden;
}
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--rf-line); font-size: 14px; }
table.data th { background: #EDF2F7; font-weight: 600; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover { background: #F7FAFC; }
table.data a { color: var(--rf-blue); text-decoration: none; font-weight: 600; }
table.data a:hover { text-decoration: underline; }

.toolbar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar .search { flex: 1; min-width: 240px; padding: 8px 12px; border: 1px solid var(--rf-line); border-radius: 6px; font: inherit; }
.toolbar .count { color: var(--rf-muted); font-size: 14px; }

.detail-grid { display: grid; grid-template-columns: 220px 1fr; gap: 8px 16px; }
.detail-grid dt { font-weight: 600; color: var(--rf-muted); }
.detail-grid dd { margin: 0; }

.site-footer {
  text-align: center;
  color: var(--rf-muted);
  font-size: 13px;
  padding: 20px;
}

/* Mobile */
@media (max-width: 640px) {
  .container { padding: 16px; }
  .section { padding: 16px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid dt { margin-top: 12px; }
}

/* Login */
.login-card {
  max-width: 380px;
  margin: 60px auto;
  background: #fff;
  padding: 28px;
  border: 1px solid var(--rf-line);
  border-radius: 8px;
}
.login-card h1 { text-align: center; margin-bottom: 18px; }

/* === Auto-expand textareas (override) === */
.field textarea {
  min-height: 80px !important;
  resize: none !important;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  box-sizing: border-box !important;
  width: 100% !important;
  overflow: hidden !important;
}

/* Force wrap and prevent horizontal scroll on textareas */
.field textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  overflow-x: hidden !important;
}
