/* RCPA Dispute Processing Form
   Brand: primary #009900, charcoal #222314, lime #C7EF57, dark green #234809, bg #FFFFFF
   Headers: Open Sans Bold; Body: Open Sans Light
*/

:root {
  --green: #009900;
  --green-dark: #234809;
  --charcoal: #222314;
  --lime: #c7ef57;
  --bg: #ffffff;
  --border: #d8d9cf;
  --border-strong: #b5b6a8;
  --muted: #5c5d52;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --warn-bg: #fffbeb;
  --warn-border: #f5d78e;
  --soft: #f4f5ef;
  --shadow: 0 1px 2px rgba(34, 35, 20, 0.06), 0 4px 16px rgba(34, 35, 20, 0.06);
  --radius: 12px;
  --font: "Open Sans", system-ui, -apple-system, sans-serif;
  --max: 760px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  color: var(--charcoal);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, legend h2 {
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1rem; }

p { margin: 0 0 0.75rem; }

a { color: var(--green); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  border-bottom: 3px solid var(--green);
  background: var(--bg);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}
.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
}
.header-text h1 {
  margin: 0;
  font-size: 1.25rem;
}

/* Main */
.main {
  flex: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  width: 100%;
}

/* Progress */
.progress {
  margin-bottom: 1.25rem;
}
.progress ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.progress li {
  flex: 1;
  min-width: 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.progress .num {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 2px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  background: var(--bg);
}
.progress li.is-active .num,
.progress li.is-done .num {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.progress li.is-active {
  color: var(--charcoal);
}
.progress li.is-done .num {
  background: var(--green-dark);
  border-color: var(--green-dark);
}
.progress li.is-done .label {
  color: var(--green-dark);
}

@media (max-width: 560px) {
  .progress .label { display: none; }
  .progress li.is-active .label { display: block; }
}

/* Cards / steps */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.35rem 1.5rem;
  margin-bottom: 1rem;
}
.card-inset {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.85rem;
}

fieldset.step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.35rem 1.5rem;
  margin: 0 0 1rem;
  background: var(--bg);
  min-width: 0;
}
fieldset.step > legend {
  padding: 0;
  float: left;
  width: 100%;
  margin-bottom: 1rem;
}
fieldset.step > legend + * {
  clear: both;
}
.step-desc {
  font-weight: 300;
  color: var(--muted);
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

/* Fields */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}
@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-weight: 600;
  font-size: 0.875rem;
}
.field > span:first-child {
  color: var(--charcoal);
}
.optional {
  font-weight: 300;
  color: var(--muted);
}
.field input,
.field textarea,
.field select {
  font: inherit;
  font-weight: 300;
  color: var(--charcoal);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  width: 100%;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}
.field input.is-invalid,
.field textarea.is-invalid {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.hint {
  display: block;
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.25rem 0 0.75rem;
}
.hint.indent { margin-left: 1.85rem; }

abbr[title="required"] {
  color: var(--danger);
  text-decoration: none;
  font-weight: 700;
}

/* Checkboxes / radios */
.check-row {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.55rem;
  cursor: pointer;
  font-weight: 400;
  font-size: 0.925rem;
  background: #fff;
}
.check-row:hover { border-color: var(--green); }
.check-row:has(input:checked) {
  border-color: var(--green);
  background: #f3faf3;
}
.check-row input {
  margin-top: 0.2rem;
  accent-color: var(--green);
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}
.check-row.nested {
  background: transparent;
  border-style: dashed;
}
.check-row.certify {
  margin-top: 1rem;
  border-color: var(--green-dark);
}

.inline-radios {
  border: 0;
  padding: 0;
  margin: 0 0 0.85rem;
}
.inline-radios legend {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  float: none;
  width: auto;
}
.inline-radios label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 1.25rem;
  font-weight: 400;
  cursor: pointer;
}
.inline-radios input { accent-color: var(--green); }

.conditional {
  margin: 0.25rem 0 1rem 0.5rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--lime);
  background: var(--soft);
  border-radius: 0 8px 8px 0;
}

.reason-group {
  margin-bottom: 1.5rem;
}
.reason-group-title {
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--lime);
  display: inline-block;
}

/* Callouts */
.callout {
  background: var(--soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
}
.callout-warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  border-left-color: #d4a017;
}

/* Transactions */
.txn-list { margin-bottom: 0.75rem; }
.txn-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.txn-title {
  margin: 0;
  font-size: 0.95rem;
}
.btn-icon {
  background: transparent;
  border: 0;
  color: var(--danger);
  font: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
}
.btn-icon:hover { background: var(--danger-bg); }

/* Files */
.file-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  background: var(--soft);
}
.file-list .fname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
}
.file-list .fsize {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Review */
.review-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.review-section:last-child { border-bottom: 0; }
.review-section h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}
.review-section .edit-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.review dl {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0;
  font-size: 0.9rem;
}
.review dt {
  font-weight: 600;
  color: var(--muted);
}
.review dd {
  margin: 0;
  font-weight: 400;
  word-break: break-word;
}
@media (max-width: 560px) {
  .review dl { grid-template-columns: 1fr; gap: 0.1rem; }
  .review dt { margin-top: 0.45rem; }
}
.review ul {
  margin: 0.25rem 0 0;
  padding-left: 1.2rem;
}
.review .txn-mini {
  font-size: 0.875rem;
  padding: 0.5rem 0.65rem;
  background: var(--soft);
  border-radius: 6px;
  margin-bottom: 0.4rem;
}

/* Buttons / nav */
.nav-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  position: sticky;
  bottom: 0;
  background: linear-gradient(transparent, var(--bg) 30%);
  padding: 1rem 0 0.25rem;
}
.nav-spacer { flex: 1; }

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 8px;
  padding: 0.75rem 1.35rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-primary:hover:not(:disabled) {
  background: var(--green-dark);
  border-color: var(--green-dark);
}
.btn-secondary {
  background: #fff;
  color: var(--green-dark);
  border-color: var(--green);
}
.btn-secondary:hover:not(:disabled) {
  background: #f3faf3;
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border-strong);
}
.btn-ghost:hover:not(:disabled) {
  color: var(--charcoal);
  border-color: var(--charcoal);
}

.form-error {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #fecdca;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0 0;
  font-weight: 400;
  font-size: 0.9rem;
}

/* Success */
.success-panel {
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.success-badge {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--charcoal);
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  font-weight: 700;
}
.success-panel .lead {
  font-size: 1.05rem;
  max-width: 32rem;
  margin: 0.5rem auto 1.5rem;
}
.ref-block {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 0.75rem 2rem;
  text-align: left;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  margin: 0 auto 1.25rem;
}
.ref-block dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.ref-block dd {
  margin: 0.15rem 0 0;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--green-dark);
  font-variant-numeric: tabular-nums;
}

.muted { color: var(--muted); font-size: 0.875rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.site-footer p { margin: 0.15rem 0; }

/* Utilities */
[hidden] { display: none !important; }


/* Transaction action buttons */
.txn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

/* Bulk paste panel */
.bulk-panel {
  margin-top: 1.25rem;
  padding: 1rem 1rem 1.15rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  background: var(--soft);
}
.bulk-panel-head h3 {
  margin: 0 0 0.35rem;
}
.bulk-toolbar {
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.bulk-paste-field {
  margin-bottom: 0;
}
.bulk-grid-wrap {
  overflow-x: auto;
  margin: 0.5rem 0 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.bulk-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  min-width: 640px;
}
.bulk-grid th,
.bulk-grid td {
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0.4rem;
  text-align: left;
  vertical-align: middle;
}
.bulk-grid th {
  font-weight: 600;
  background: var(--soft);
  position: sticky;
  top: 0;
  white-space: nowrap;
}
.bulk-grid .bulk-idx {
  color: var(--muted);
  font-weight: 600;
  width: 2rem;
  text-align: center;
}
.bulk-grid input {
  font: inherit;
  font-weight: 300;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  background: #fff;
  color: var(--charcoal);
}
.bulk-grid input:focus {
  outline: 2px solid var(--green);
  outline-offset: 0;
  border-color: var(--green);
}
.bulk-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.check-row-block {
  border-color: #d4a017;
  background: var(--warn-bg);
}
.check-row-block:has(input:checked) {
  border-color: var(--green);
  background: #f3faf3;
}


/* Date fields MM-DD-YYYY */
input[placeholder="MM-DD-YYYY"],
.txn-date,
.bulk-date,
#field-date,
#field-lost-date,
#field-no-part,
#field-police-date,
#field-valid-date {
  font-variant-numeric: tabular-nums;
}

/* Hidden field for bots; real visitors never see it. */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.g-recaptcha { margin: 1rem 0; }
