/* ============ Tokens ============ */
.cmp-app {
  --cmp-navy: #0A1F44;
  --cmp-navy-2: #15294F;
  --cmp-navy-line: #1A3358;
  --cmp-mint: #6FE7B7;
  --cmp-mint-soft: #E8F7F0;
  --cmp-cream: #F7F5F0;
  --cmp-cream-2: #FAFAF6;
  --cmp-border: #E0DCD2;
  --cmp-muted: #6B6B6B;
  --cmp-text: #1A1A1A;
  --cmp-green: #00543C;
  --cmp-green-2: #00875F;
  --cmp-amber: #7A5406;
  --cmp-amber-soft: #FEF4E0;
  --cmp-ice: #C7DFF5;
  --cmp-serif: Fraunces, Georgia, serif;
  --cmp-sans: Geist, system-ui, sans-serif;
}

/* ============ Base ============ */
/* Base rules are scoped to .cmp-app so nothing leaks into the rest of your Laravel app */
.cmp-app,
.cmp-app *,
.cmp-app *::before,
.cmp-app *::after {
  box-sizing: border-box;
}

.cmp-app [hidden] {
  display: none !important;
}

:where(.cmp-app) button {
  font: inherit;
  cursor: pointer;
}

:where(.cmp-app) input,
:where(.cmp-app) textarea {
  font: inherit;
}

:where(.cmp-app) a {
  color: var(--cmp-navy);
}

:where(.cmp-app) a:hover {
  color: var(--cmp-green-2);
}

:where(.cmp-app) :is(h1, h2, p) {
  margin: 0;
}

.cmp-app {
  width: 100%;
  background: var(--cmp-cream);
  color: var(--cmp-text);
  font-family: var(--cmp-sans);
  font-size: 15px;
  line-height: 23px;
  -webkit-font-smoothing: antialiased;
}

.cmp-main {
  /* flex: 1 1 0;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 20px; */
  padding-top: 45px;
  padding-bottom: 80px;
}

/* ============ Layout helpers ============ */
.cmp-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cmp-stack--8 {
  gap: 8px;
}

.cmp-stack--10 {
  gap: 10px;
}

.cmp-stack--12 {
  gap: 12px;
}

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

.cmp-grid-2--10 {
  gap: 10px;
}

.cmp-grid-2--16 {
  gap: 16px;
}

.cmp-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  font-size: 13px;
  line-height: 19px;
}

.cmp-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.cmp-form-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.cmp-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.cmp-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ============ Typography ============ */
.cmp-h1 {
  font-family: var(--cmp-serif);
  font-weight: 400;
  font-size: 40px;
  line-height: 46px;
  letter-spacing: -0.01em;
  color: var(--cmp-navy);
}

.cmp-h2 {
  font-family: var(--cmp-serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 32px;
  color: var(--cmp-navy);
  margin-bottom: 6px;
}

.cmp-h3 {
  font-family: var(--cmp-serif);
  font-weight: 500;
  font-size: 19px;
  line-height: 24px;
  color: var(--cmp-navy);
}

.cmp-h3--tight {
  margin-bottom: 2px;
}

.cmp-h3--20 {
  font-size: 20px;
  line-height: 26px;
}

.cmp-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cmp-green);
  margin-bottom: 6px;
}

.cmp-lead {
  font-size: 14px;
  color: var(--cmp-muted);
}

.cmp-crumbs {
  font-size: 12px;
  color: var(--cmp-muted);
}

.cmp-crumbs a {
  color: var(--cmp-muted);
  text-decoration: none;
}

.cmp-crumbs span {
  color: var(--cmp-navy);
}

.cmp-muted-13 {
  font-size: 13px;
  color: var(--cmp-muted);
}

.cmp-muted-p {
  color: var(--cmp-muted);
}

.cmp-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--cmp-muted);
}

.cmp-label {
  font-size: 14px;
  font-weight: 500;
}

/* ============ Cards ============ */
.cmp-card {
  background: #fff;
  border: 1px solid var(--cmp-border);
  border-radius: 16px;
}

.cmp-card--form {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cmp-card--side {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cmp-card--gap6 {
  gap: 6px;
}

.cmp-card--navy {
  background: var(--cmp-navy);
  border-color: var(--cmp-navy);
  padding: 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cmp-card--navy .cmp-h3 {
  color: #fff;
}

.cmp-card--done {
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cmp-side__phone {
  font-size: 14px;
  color: var(--cmp-muted);
}

.cmp-side__phone strong {
  font-weight: 500;
  color: var(--cmp-navy);
}

.cmp-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cmp-panel.cmp-at-evidence {
  gap: 20px;
}

.cmp-panel.cmp-at-identity {
  gap: 24px;
}

/* ============ Stepper ============ */
.cmp-stepper {
  background: #fff;
  border: 1px solid var(--cmp-border);
  border-radius: 16px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cmp-step {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cmp-step:last-child .cmp-step__rule {
  background: transparent;
}

.cmp-step__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0;
  cursor: pointer;
}

.cmp-step__n {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--cmp-serif);
  font-size: 14px;
  background: var(--cmp-cream);
  color: var(--cmp-muted);
}

.cmp-step__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--cmp-muted);
  white-space: nowrap;
}

.cmp-step__rule {
  flex: 1 1 0;
  height: 1px;
  background: var(--cmp-border);
}

/* Current step = navy */
.cmp-app:not(:has(:is(#cmp-v-what, #cmp-v-evidence, #cmp-v-review):checked)) .cmp-step--identity .cmp-step__n,
.cmp-app:has(#cmp-v-what:checked) .cmp-step--what .cmp-step__n,
.cmp-app:has(#cmp-v-evidence:checked) .cmp-step--evidence .cmp-step__n,
.cmp-app:has(#cmp-v-review:checked) .cmp-step--review .cmp-step__n {
  background: var(--cmp-navy);
  color: #fff;
}

/* Earlier steps = mint */
.cmp-app:has(:is(#cmp-v-what, #cmp-v-evidence, #cmp-v-review):checked) .cmp-step--identity .cmp-step__n,
.cmp-app:has(:is(#cmp-v-evidence, #cmp-v-review):checked) .cmp-step--what .cmp-step__n,
.cmp-app:has(#cmp-v-review:checked) .cmp-step--evidence .cmp-step__n {
  background: var(--cmp-mint);
  color: var(--cmp-navy);
}

/* Label colour for current + earlier */
.cmp-app:not(:has(:is(#cmp-v-what, #cmp-v-evidence, #cmp-v-review):checked)) .cmp-step--identity .cmp-step__label,
.cmp-app:has(#cmp-v-what:checked) .cmp-step--what .cmp-step__label,
.cmp-app:has(#cmp-v-evidence:checked) .cmp-step--evidence .cmp-step__label,
.cmp-app:has(#cmp-v-review:checked) .cmp-step--review .cmp-step__label,
.cmp-app:has(:is(#cmp-v-what, #cmp-v-evidence, #cmp-v-review):checked) .cmp-step--identity .cmp-step__label,
.cmp-app:has(:is(#cmp-v-evidence, #cmp-v-review):checked) .cmp-step--what .cmp-step__label,
.cmp-app:has(#cmp-v-review:checked) .cmp-step--evidence .cmp-step__label {
  color: var(--cmp-navy);
}

/* ============ Choice controls (real radios/checkboxes, hidden; styled via :has) ============ */
.cmp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

:where(.cmp-app) label {
  cursor: pointer;
}

.cmp-dot {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #8F8B82;
  background: #fff;
  box-shadow: inset 0 0 0 3px #fff;
}

:is(.cmp-opt, .cmp-mode):has(input:checked) .cmp-dot {
  border-color: var(--cmp-green-2);
  background: var(--cmp-green-2);
}

:is(.cmp-opt, .cmp-mode, .cmp-chip, .cmp-want, .cmp-toggle label):has(input:focus-visible) {
  outline: 2px solid var(--cmp-green-2);
  outline-offset: 2px;
}

.cmp-opt {
  text-align: left;
  min-height: 64px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--cmp-border);
  color: var(--cmp-text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.cmp-opt:has(input:checked) {
  background: var(--cmp-mint-soft);
  border-color: var(--cmp-green-2);
}

.cmp-opt__label {
  display: block;
  font-size: 15px;
  font-weight: 500;
}

.cmp-opt__sub {
  display: block;
  font-size: 12px;
  color: var(--cmp-muted);
}

.cmp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cmp-chip {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  background: #fff;
  color: var(--cmp-text);
  border: 1px solid var(--cmp-border);
}

.cmp-chip:has(input:checked) {
  background: var(--cmp-navy);
  color: #fff;
  border-color: var(--cmp-navy);
}

.cmp-want {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 56px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 19px;
  background: #fff;
  border: 1px solid var(--cmp-border);
  color: var(--cmp-text);
}

.cmp-want:has(input:checked) {
  background: var(--cmp-mint-soft);
  border-color: var(--cmp-green-2);
}

/* Mode cards */
.cmp-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cmp-mode {
  text-align: left;
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid var(--cmp-border);
  color: var(--cmp-text);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cmp-mode:has(input:checked) {
  background: var(--cmp-mint-soft);
  border-color: var(--cmp-green-2);
}

.cmp-mode__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}

.cmp-mode__title {
  font-family: var(--cmp-serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 26px;
  color: var(--cmp-navy);
}

.cmp-mode__text {
  font-size: 13px;
  line-height: 19px;
  color: var(--cmp-muted);
  min-height: 38px;
}

.cmp-mode__row {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--cmp-border);
  font-size: 13px;
}

.cmp-mode__row span:first-child {
  color: var(--cmp-muted);
}

.cmp-mode__row span:last-child {
  font-weight: 500;
}

/* ============ Account box ============ */
.cmp-account {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-radius: 14px;
  background: var(--cmp-cream-2);
  border: 1px solid var(--cmp-border);
}

.cmp-account__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cmp-account__title {
  display: block;
  font-family: var(--cmp-serif);
  font-weight: 500;
  font-size: 19px;
  color: var(--cmp-navy);
}

.cmp-account__sub {
  font-size: 13px;
  color: var(--cmp-muted);
}

.cmp-toggle {
  flex: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #ECE8DF;
}

.cmp-toggle label {
  display: grid;
  place-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  color: var(--cmp-muted);
}

.cmp-toggle label:has(input:checked) {
  background: #fff;
  color: var(--cmp-navy);
}

.cmp-forgot {
  font-size: 13px;
  font-weight: 400;
}

/* Anonymous box */
.cmp-anon {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-radius: 14px;
  background: var(--cmp-navy);
  color: #fff;
}

.cmp-anon__title {
  display: block;
  font-family: var(--cmp-serif);
  font-weight: 500;
  font-size: 19px;
}

.cmp-anon__sub {
  font-size: 13px;
  color: var(--cmp-ice);
}

.cmp-tradeoff {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--cmp-navy-2);
}

.cmp-tradeoff strong {
  display: block;
  font-weight: 500;
}

.cmp-tradeoff span {
  color: var(--cmp-ice);
}

/* ============ Form fields ============ */
.cmp-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.cmp-field--sm {
  gap: 6px;
  font-size: 13px;
}

.cmp-input {
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--cmp-border);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 400;
  color: var(--cmp-text);
  outline: 0;
  width: 100%;
}

.cmp-input:focus-visible {
  border-color: var(--cmp-green-2);
  box-shadow: 0 0 0 3px rgba(0, 135, 95, .18);
}

.cmp-input--white {
  background: #fff;
}

.cmp-input--cream {
  background: var(--cmp-cream);
}

.cmp-textarea {
  height: auto;
  padding: 12px 16px;
  line-height: 22px;
  resize: vertical;
}

.cmp-desc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 20px;
  align-items: start;
}

/* ============ Notes / warnings ============ */
.cmp-note {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 19px;
}

.cmp-note--green {
  background: var(--cmp-mint-soft);
  color: var(--cmp-green);
}

.cmp-warn {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--cmp-amber-soft);
  color: var(--cmp-amber);
  font-size: 13px;
  line-height: 20px;
}

.cmp-warn strong {
  font-weight: 600;
}

.cmp-warn--row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cmp-warn--row>span {
  flex: 1 1 0;
}

/* ============ Buttons ============ */
.cmp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 0;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
}

.cmp-btn:focus-visible,
.cmp-step__btn:focus-visible {
  outline: 2px solid var(--cmp-green-2);
  outline-offset: 2px;
}

.cmp-btn--navy {
  background: var(--cmp-navy);
  color: #fff;
  padding: 0 24px;
}

.cmp-btn--navy:hover {
  opacity: .92;
}

.cmp-btn--ghost {
  border: 1px solid var(--cmp-border);
  background: #fff;
  color: var(--cmp-navy);
}

.cmp-btn--mint {
  background: var(--cmp-mint);
  color: var(--cmp-navy);
}

.cmp-btn--amber {
  flex: none;
  height: 44px;
  padding: 0 16px;
  font-size: 14px;
  border: 1px solid var(--cmp-amber);
  background: #fff;
  color: var(--cmp-amber);
}

.cmp-btn--outline-light {
  height: 44px;
  padding: 0 16px;
  font-size: 14px;
  border: 1px solid var(--cmp-navy-line);
  background: transparent;
  color: #fff;
}

.cmp-btn--lg {
  height: 50px;
}

.cmp-btn--bottom {
  margin-top: auto;
}

.cmp-form-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--cmp-border);
}

.cmp-foot-note {
  flex: 1 1 0;
  font-size: 12px;
  color: var(--cmp-muted);
}

/* ============ Dropzone & files ============ */
.cmp-dropzone {
  border: 2px dashed #C9C4B8;
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.cmp-dropzone.cmp-is-over {
  border-color: var(--cmp-green-2);
  background: var(--cmp-mint-soft);
}

.cmp-dropzone__title {
  font-family: var(--cmp-serif);
  font-weight: 500;
  font-size: 20px;
  color: var(--cmp-navy);
}

.cmp-file {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--cmp-border);
  border-radius: 12px;
}

.cmp-file__ext {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--cmp-cream);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--cmp-muted);
}

.cmp-file__body {
  flex: 1 1 0;
  min-width: 0;
}

.cmp-file__name {
  display: block;
  font-weight: 500;
  color: var(--cmp-navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmp-file__meta {
  display: block;
  font-size: 12px;
  color: var(--cmp-green);
}

.cmp-file__remove {
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--cmp-border);
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
}

/* ============ Review ============ */
.cmp-review {
  border: 1px solid var(--cmp-border);
  border-radius: 14px;
  overflow: hidden;
}

.cmp-review__row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--cmp-border);
  font-size: 14px;
  line-height: 21px;
}

.cmp-review__row:first-child {
  border-top: 0;
}

.cmp-review__row span:first-child {
  color: var(--cmp-muted);
}

.cmp-review__row span:last-child {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.cmp-id-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--cmp-mint-soft);
  color: var(--cmp-green);
}

.cmp-id-banner--anon {
  background: var(--cmp-navy);
  color: #fff;
}

.cmp-id-banner__title {
  display: block;
  font-family: var(--cmp-serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 26px;
}

.cmp-id-banner__text {
  font-size: 13px;
  line-height: 19px;
  color: var(--cmp-green);
}

.cmp-id-banner--anon .cmp-id-banner__text {
  color: var(--cmp-ice);
}

.cmp-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 21px;
}

.cmp-consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--cmp-navy);
}

/* ============ Sidebar rows ============ */
.cmp-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--cmp-border);
  font-size: 13px;
  line-height: 19px;
}

.cmp-kv span:first-child {
  color: var(--cmp-muted);
}

.cmp-kv span:not(:first-child) {
  font-weight: 500;
  text-align: right;
}

.cmp-kv .cmp-is-navy {
  color: var(--cmp-navy);
}

.cmp-kv .cmp-is-green {
  color: var(--cmp-green);
}

.cmp-next {
  display: flex;
  gap: 12px;
}

.cmp-next__n {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cmp-mint);
  color: var(--cmp-navy);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
}

.cmp-next__label {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.cmp-next__sub {
  display: block;
  font-size: 12px;
  color: var(--cmp-mint);
}

/* ============ Done ============ */
.cmp-done {
  max-width: 640px;
  width: 100%;
  margin: 24px auto 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cmp-done__main {
  background: var(--cmp-navy);
  border-radius: 18px;
  padding: 32px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cmp-done__title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cmp-done__title h1 {
  font-family: var(--cmp-serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 36px;
}

.cmp-done__check {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cmp-mint);
  display: grid;
  place-items: center;
}

.cmp-case {
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--cmp-navy-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cmp-case__label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--cmp-ice);
}

.cmp-case__code {
  display: block;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 26px;
  line-height: 34px;
  color: var(--cmp-mint);
}

.cmp-done__text {
  color: var(--cmp-ice);
}

.cmp-done__cta {
  display: flex;
  gap: 10px;
}

.cmp-done__cta .cmp-btn {
  flex: 1 1 0;
}

.cmp-done-step {
  display: flex;
  gap: 12px;
  font-size: 14px;
  line-height: 21px;
}

.cmp-done-step__n {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cmp-mint-soft);
  color: var(--cmp-green);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
}

/* Inline "pick at least one" error */
.cmp-field-error { 
  color: #B42318; 
  font-size: 13px; 
  font-weight: 500; 
}
.cmp-chips.cmp-is-invalid .cmp-chip { border-color: #B42318; }
.field-error { 
  color: #c0392b; 
  font-size: 12px; 
  display: block; 
  min-height: 14px; 
}

/* get verifying code blog */
.cmp-code-verify-wrapper{
  margin-top: 7px;
}

.cmp-code-verify-wrapper input{
  flex:1;
  border-radius:12px 0 0 12px;
}

.cmp-code-verify-wrapper button{
  color:white;
  cursor:pointer;
  padding:0 8px;
  background:linear-gradient(90deg,#058248,#058248);
  border-top-right-radius:12px;
  border-bottom-right-radius:12px;
}

.cmp-code-verify-wrapper button:hover{
    opacity:0.9;
}

.cmp-authed-note { display: none; }
.cmp-account.cmp-is-authed > :not(.cmp-authed-note) { display: none; }
.cmp-account.cmp-is-authed > .cmp-authed-note { display: block; }
a.cmp-btn { text-decoration: none; }

/* ============ Responsive (additions beyond the 1280px mockup) ============ */
@media (max-width: 960px) {
  .cmp-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cmp-step__label {
    display: none;
  }

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

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

  .cmp-form-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .cmp-main {
    padding: 16px 16px 48px;
  }

  .cmp-h1 {
    font-size: 32px;
    line-height: 38px;
  }

  .cmp-card--form {
    padding: 20px;
  }

  .cmp-modes,
  .cmp-grid-2,
  .cmp-grid-4,
  .cmp-desc-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .cmp-account__head,
  .cmp-warn--row,
  .cmp-case {
    flex-direction: column;
    align-items: flex-start;
  }

  .cmp-review__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .cmp-form-foot {
    flex-wrap: wrap;
  }

  .cmp-foot-note {
    flex-basis: 100%;
  }

  .cmp-btn--navy {
    flex: 1 1 0;
  }

  .cmp-done__main {
    padding: 24px;
  }
}

/* ============ Screen + variant switching (pure CSS, driven by the hidden radios) ============ */
/* Screens. DEFAULT (nothing checked) = the form, step 1.
   The form is shown unless done is chosen. */
.cmp-app:has(#cmp-v-done:checked) .cmp-view--form,
.cmp-app:not(:has(#cmp-v-done:checked)) .cmp-view--done {
  display: none;
}

/* Form steps. Step 1 shows unless another step is chosen. */
.cmp-app:has(:is(#cmp-v-what, #cmp-v-evidence, #cmp-v-review):checked) .cmp-at-identity,
.cmp-app:not(:has(#cmp-v-what:checked)) .cmp-at-what,
.cmp-app:not(:has(#cmp-v-evidence:checked)) .cmp-at-evidence,
.cmp-app:not(:has(#cmp-v-review:checked)) .cmp-at-review {
  display: none;
}

/* Filing mode + account tab. DEFAULT = with my name / sign up. */
.cmp-app:has(#cmp-m-anon:checked) .cmp-only-named,
.cmp-app:not(:has(#cmp-m-anon:checked)) .cmp-only-anon,
.cmp-app:has(#cmp-a-signin:checked) .cmp-only-signup,
.cmp-app:not(:has(#cmp-a-signin:checked)) .cmp-only-signin {
  display: none;
}

/* Scam note: only when "phishing or scam" is chosen */
.cmp-only-scam {
  display: none;
}

.cmp-app:has(#cmp-w-4:checked) .cmp-only-scam {
  display: block;
}

/* Anonymous + personal outcome wanted -> warning */
.cmp-anon-warn {
  display: none;
}

.cmp-app:has(#cmp-m-anon:checked):has(:is(#cmp-n-1, #cmp-n-2):checked) .cmp-anon-warn {
  display: flex;
}

/* Server-side validation errors */
.cmp-errors {
  background: #FDECEC;
  color: #8A1C1C;
}

.cmp-errors ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

/* Defaults look selected too when nothing is checked yet: "With my name" and "Sign up" */
.cmp-modes:not(:has(input:checked)) .cmp-mode:first-child {
  background: var(--cmp-mint-soft);
  border-color: var(--cmp-green-2);
}

.cmp-modes:not(:has(input:checked)) .cmp-mode:first-child .cmp-dot {
  border-color: var(--cmp-green-2);
  background: var(--cmp-green-2);
}

.cmp-toggle:not(:has(input:checked)) label:first-child {
  background: #fff;
  color: var(--cmp-navy);
}
/* ============ "Which company?" search (step 2) ============ */
.cmp-company {
  position: relative;
}

.cmp-company__box {
  position: relative;
}

.cmp-company__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cmp-muted);
  pointer-events: none;
}

.cmp-company__input {
  padding-left: 42px;
}

.cmp-company:focus-within .cmp-company__input:not(:placeholder-shown) {
  background: #fff;
  border-color: var(--cmp-navy);
}

.cmp-company.cmp-is-picked .cmp-company__input {
  background: var(--cmp-cream);
  border-color: var(--cmp-border);
}

.cmp-company__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  max-height: 380px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--cmp-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(10, 31, 68, .12);
  font-weight: 400;
}

.cmp-company__menu[hidden] {
  display: none;
}

.cmp-company__head {
  padding: 14px 16px 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cmp-muted);
}

.cmp-company__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--cmp-border);
  cursor: pointer;
}

.cmp-company__item:hover,
.cmp-company__item.cmp-is-active {
  background: var(--cmp-cream);
}

.cmp-company__logo {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--cmp-navy);
}

.cmp-company__logo--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--cmp-serif);
  font-size: 14px;
}

.cmp-company__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.cmp-company__kh {
  font-size: 15px;
  font-weight: 500;
  color: var(--cmp-text);
}

.cmp-company__en {
  font-size: 14px;
  color: var(--cmp-text);
}

.cmp-company__meta {
  font-size: 12px;
  color: var(--cmp-muted);
}

.cmp-company__badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--cmp-mint-soft);
  color: var(--cmp-green-2);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cmp-company__badge--off {
  background: var(--cmp-amber-soft);
  color: var(--cmp-amber);
}

.cmp-company__foot {
  padding: 12px 16px;
  border-top: 1px solid var(--cmp-border);
  background: var(--cmp-cream);
  font-size: 13px;
  color: var(--cmp-muted);
}

.cmp-company__matched {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--cmp-green-2);
}

.cmp-company__matched[hidden] {
  display: none;
}

@media (max-width: 560px) {
  .cmp-company__item {
    flex-wrap: wrap;
  }

  .cmp-company__badge {
    margin-left: 48px;
  }
}
