:root {
  color-scheme: light;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f5f7;
  color: #1e1f22;
}

body {
  margin: 0;
  padding: 0;
}

.site-header {
  background: #0f1a3a;
  color: #fff;
  padding: 24px;
}

.site-header h1 {
  margin: 0 0 8px;
}

.metadata p {
  margin: 4px 0;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(15, 26, 58, 0.08);
}

.card h2 {
  margin-top: 0;
}

label {
  display: block;
  margin: 12px 0;
  font-weight: 600;
}

label input,
label select {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  width: 100%;
  max-width: 480px;
  border-radius: 6px;
  border: 1px solid #c9cdd3;
}

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

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 500;
}

.checkbox-item a {
  color: inherit;
  text-decoration: underline;
}

.checkbox-item input {
  margin-top: 4px;
}

.adjustment-group {
  margin-bottom: 16px;
}

.stack > * {
  margin-bottom: 16px;
}

.count-card,
.group-card {
  border: 1px solid #e0e3e8;
  border-radius: 10px;
  padding: 16px;
  background: #f9fafc;
}

.count-header,
.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.count-header input,
.group-header input {
  margin: 0;
  max-width: 360px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #c9cdd3;
}

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

.specific-characteristics-block {
  margin-bottom: 16px;
}

.specific-characteristics-block button {
  margin-top: 8px;
}

.count-specific-list {
  display: grid;
  gap: 8px;
  margin: 8px 0 0 18px;
}

.count-specific-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.count-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.criminal-history-factor {
  padding: 12px;
  border: 1px solid #e0e3e8;
  border-radius: 10px;
  background: #fff;
}

.criminal-history-factor .note {
  margin: 0 0 8px;
}

.adjustment-block h3 {
  margin: 8px 0 12px;
}

.adjustment-block h4 {
  margin: 12px 0 6px;
}

.custom-adjustment-block {
  margin-top: 16px;
}

.offense-reference {
  margin: 4px 0 12px;
}

.offense-reference a {
  color: #0f1a3a;
  text-decoration: underline;
}


.grouping-adjustment-block {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e0e3e8;
}

.inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.inline-fields label {
  margin: 0;
  flex: 1 1 240px;
}

input[readonly] {
  background: #f2f4f8;
}

.group-output {
  display: grid;
  gap: 12px;
}

.group-output-card {
  background: #f7f8fb;
  border: 1px solid #e0e3e8;
  border-radius: 10px;
  padding: 12px;
}

.compact-list {
  margin: 8px 0 0 18px;
}

.custom-adjustment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.custom-adjustment-row input {
  flex: 1;
  min-width: 180px;
}

.custom-adjustment-row button {
  padding: 8px 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.file-label {
  background: #e7e9f1;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.file-label input {
  display: none;
}

.actions {
  display: flex;
  justify-content: flex-end;
}

button {
  background: #0f1a3a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.radio-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

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

.output-grid p {
  font-size: 1.4rem;
  margin: 4px 0 0;
}

.note {
  font-size: 0.9rem;
  color: #4a4f55;
}

.source-list {
  margin: 12px 0;
  padding-left: 20px;
}

.source-list li {
  margin-bottom: 8px;
}

.source-list a {
  word-break: break-word;
}

.error {
  color: #b00020;
  font-weight: 600;
}

.site-footer {
  padding: 20px 24px;
  background: #e7e9f1;
  font-size: 0.9rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 58, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  max-width: 520px;
  margin: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
