:root {
  --bg: #f6efe4;
  --surface: rgba(255, 252, 247, 0.92);
  --surface-strong: #fffaf2;
  --text: #21201d;
  --muted: #6f675c;
  --line: rgba(33, 32, 29, 0.08);
  --accent: #bf7b35;
  --accent-deep: #7c3f12;
  --accent-soft: #efd6ba;
  --success: #245a3f;
  --shadow: 0 20px 50px rgba(79, 47, 12, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 30%),
    linear-gradient(145deg, #efe1ce 0%, #f8f2e9 48%, #eed9c1 100%);
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero h1,
.section-heading h2,
.department h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
}

.hero-copy {
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-panel,
.card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.hero-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.panel-label,
.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--accent-deep);
  font-weight: 800;
}

.tabs {
  display: inline-flex;
  padding: 6px;
  gap: 6px;
  background: rgba(255, 250, 242, 0.72);
  border-radius: 999px;
  margin-bottom: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.tab {
  border: 0;
  background: transparent;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.tab.is-active {
  background: var(--accent-deep);
  color: #fffaf2;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 22px;
}

.reports-grid {
  grid-template-columns: 1.35fr 0.9fr;
}

.card {
  padding: 24px;
}

.card-large {
  padding-bottom: 30px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.inline-space {
  margin-top: 30px;
}

.pill {
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 999px;
}

.muted {
  color: var(--muted);
  margin: 0;
  max-width: 44ch;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span,
.field-title {
  font-size: 0.95rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.departments {
  display: grid;
  gap: 16px;
}

.department {
  padding: 20px;
  border-radius: 24px;
  background: var(--surface-strong);
  border: 1px solid rgba(33, 32, 29, 0.06);
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.staff-card {
  border: 1px solid transparent;
  background: #fff;
  border-radius: 24px;
  padding: 18px 16px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 8px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 14px 24px rgba(130, 92, 46, 0.08);
}

.staff-card:hover,
.staff-card:focus-visible,
.star-button:hover,
.star-button:focus-visible,
.chip:hover,
.chip:focus-visible {
  transform: translateY(-2px);
}

.staff-card.is-selected {
  border-color: rgba(191, 123, 53, 0.65);
  box-shadow: 0 18px 34px rgba(138, 84, 26, 0.18);
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f7dfc3, #d4a06c);
  color: var(--accent-deep);
  font-weight: 800;
}

.staff-role,
.staff-score {
  color: var(--muted);
  font-size: 0.9rem;
}

.overall-rating {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.star-button {
  border: 1px solid rgba(191, 123, 53, 0.16);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 18px 12px;
  cursor: pointer;
  text-align: center;
  color: var(--accent-deep);
  font-weight: 800;
}

.star-button.is-active {
  background: linear-gradient(180deg, #c78139 0%, #8d4918 100%);
  color: #fff;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border: 1px solid rgba(191, 123, 53, 0.18);
  border-radius: 999px;
  background: #fff;
  padding: 10px 14px;
  cursor: pointer;
}

.chip.is-selected {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: rgba(191, 123, 53, 0.4);
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  background: var(--accent-deep);
  color: #fff7ee;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-deep);
  border: 1px solid rgba(191, 123, 53, 0.14);
}

.info-list,
.stack-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.info-list li,
.stack-item {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  line-height: 1.6;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}

.success-panel {
  padding: 18px;
  border-radius: 22px;
  background: rgba(36, 90, 63, 0.12);
  color: var(--success);
}

.hidden {
  display: none;
}

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

.metric {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.metric strong {
  display: block;
  font-size: 1.8rem;
  margin-top: 8px;
}

.table-wrap {
  overflow-x: auto;
}

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

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

th {
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 1100px) {
  .hero,
  .grid,
  .reports-grid {
    grid-template-columns: 1fr;
  }

  .staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 100%);
  }

  .form-grid,
  .form-grid.compact,
  .metrics,
  .overall-rating,
  .staff-grid {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }
}
