:root {
  --bg: #f6f4ef;
  --paper: #ffffff;
  --ink: #172026;
  --muted: #5c6870;
  --line: #d9ddd8;
  --accent: #1f7a6a;
  --accent-dark: #155649;
  --focus: #c2842d;
}

* {
  box-sizing: border-box;
}

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

.page {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.compact {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.hero {
  padding: 40px 0 28px;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(1.6rem, 3.4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero p {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.1rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.section {
  width: 100%;
  margin: 18px 0;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.section h2 {
  margin: 0 0 20px;
  font-size: 1.45rem;
}

fieldset {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

legend,
.field span {
  margin-bottom: 8px;
  font-weight: 700;
}

label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

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

input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.field {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.text-input,
.field input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(194, 132, 45, 0.28);
  border-color: var(--focus);
}

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

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

.scale {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.conditional {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.hidden {
  display: none !important;
}

.hint {
  min-height: 1.4em;
  margin: 2px 0 0;
  color: var(--muted);
}

.consent {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.split {
  justify-content: space-between;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  background: var(--accent-dark);
}

.alert {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #d99067;
  border-radius: 6px;
  background: #fff2ea;
  color: #663313;
}

.alert ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.alert li + li {
  margin-top: 4px;
}

.login {
  max-width: 460px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}

th {
  background: #eef4f1;
}


.ordered-checks {
  gap: 12px;
}

.ordered-option {
  align-items: center;
  min-height: 34px;
}

.rank-badge {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.ordered-option input:checked + .rank-badge {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.ordered-option input:disabled + .rank-badge {
  opacity: 0.55;
}
.notice {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #8cc0a6;
  border-radius: 6px;
  background: #eef8f3;
  color: #174f3d;
}

.settings-panel h2 {
  margin: 0 0 18px;
  font-size: 1.25rem;
}

.admin-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.admin-tab:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.admin-tab.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.settings-panel label + label {
  margin-top: 10px;
}

.summary-overview h2,
.summary-card h3 {
  margin: 0 0 16px;
}

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

.summary-kpi {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbfa;
}

.summary-kpi-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.summary-kpi strong {
  font-size: 1.6rem;
}

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

.summary-card {
  margin: 0;
}

.summary-empty {
  margin: 0;
  color: var(--muted);
}

.summary-list {
  display: grid;
  gap: 12px;
}

.summary-row {
  display: grid;
  gap: 6px;
}

.summary-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
}

.summary-bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e6eeea;
  overflow: hidden;
}

.summary-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.inline-form {
  margin: 0;
}

.danger-button {
  min-height: 34px;
  padding: 7px 10px;
  background: #b33a2f;
  font-size: 0.86rem;
}

.danger-button:hover {
  background: #842820;
}
@media (max-width: 760px) {
  .page {
    width: min(100% - 20px, 1040px);
    padding-top: 14px;
  }

  .section {
    padding: 18px;
  }

  .three {
    grid-template-columns: 1fr;
  }

  .summary-kpis,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .admin-menu {
    flex-direction: column;
  }

  .actions,
  .split {
    align-items: stretch;
    flex-direction: column;
  }

  button,
  .button-link {
    width: 100%;
  }
}
