/* ============================================================
   EasyH1B — interactive: wizard, fees, season strip, data, glossary
   ============================================================ */

/* ---------- honesty note under eligibility head ---------- */

.honesty-note {
  margin-top: 14px;
  display: inline-block;
  padding: 9px 15px;
  border: 1.5px solid var(--line-2);
  border-left: 5px solid var(--marigold);
  border-radius: var(--radius-s);
  background: #fff;
  font-size: 14.5px;
  color: var(--muted);
  max-width: 62ch;
}

/* ---------- wizard ---------- */

.wizard-wrap {
  max-width: 680px;
}

.wizard-nojs {
  padding: 18px 20px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius-m);
  color: var(--muted);
}

.wizard-card {
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-l);
  background: #fff;
  padding: clamp(24px, 3vw, 34px);
  box-shadow: 9px 9px 0 rgba(23, 67, 207, 0.09);
}

.wizard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.wizard-step-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.wizard-rail {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
}

.wizard-rail-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: var(--cobalt);
  transition: width 0.35s cubic-bezier(0.22, 0.9, 0.3, 1);
}

.wizard-coach {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--faint);
}

.wizard-coach::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--marigold);
  vertical-align: 1px;
}

.wizard-question {
  font-family: var(--display);
  font-stretch: 112.5%;
  font-weight: 600;
  font-size: clamp(21px, 2.4vw, 27px);
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}

.wizard-qhint {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 20px;
}

.wizard-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.wizard-fieldset legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.wizard-choices {
  display: grid;
  gap: 10px;
}

.choice {
  display: block;
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice-face {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border: 1.5px solid var(--line-2);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease,
    box-shadow 0.15s ease;
}

.choice-face:hover {
  border-color: var(--cobalt);
  background: var(--cobalt-soft);
  transform: translateX(3px);
}

.choice input:checked + .choice-face {
  border: 2px solid var(--cobalt);
  padding: 14px 16px;
  background: var(--cobalt-soft);
  box-shadow: 4px 4px 0 rgba(23, 67, 207, 0.16);
}

.choice input:focus-visible + .choice-face {
  outline: 3px solid var(--cobalt);
  outline-offset: 2px;
}

.choice-radio {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--line-2);
  background: #fff;
  position: relative;
  transition: border-color 0.15s ease;
}

.choice input:checked + .choice-face .choice-radio {
  border-color: var(--cobalt);
}

.choice input:checked + .choice-face .choice-radio::after {
  content: "";
  position: absolute;
  inset: 3.5px;
  border-radius: 50%;
  background: var(--cobalt);
}

.choice-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.choice-label {
  font-weight: 700;
  font-size: 16.5px;
  color: var(--ink);
}

.choice-hint {
  font-size: 13.5px;
  color: var(--muted);
}

.wizard-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.wizard-actions .btn-next {
  margin-left: auto;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.wizard-key-hint {
  width: 100%;
  margin-top: 6px;
  font-size: 13px;
  color: var(--faint);
}

/* step transition (motion-safe) */
@media (prefers-reduced-motion: no-preference) {
  .wizard-card.step-in {
    animation: step-in 0.3s cubic-bezier(0.22, 0.9, 0.3, 1);
  }

  @keyframes step-in {
    from {
      opacity: 0;
      transform: translateX(16px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ---------- wizard result ---------- */

.result-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.result-title {
  font-family: var(--display);
  font-stretch: 112.5%;
  font-weight: 600;
  font-size: clamp(24px, 2.8vw, 32px);
  letter-spacing: -0.02em;
}

.chip-route-lottery {
  background: var(--cobalt);
  color: #fff;
}

.chip-route-exempt {
  background: var(--ink);
  color: #fff;
}

.chip-route-lawyer {
  background: var(--marigold);
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.chip-route-employer {
  background: #fff;
  color: var(--cobalt);
  border: 2px solid var(--cobalt);
}

.result-block {
  margin-top: 20px;
}

.result-block h3 {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}

.result-block p {
  font-size: 16px;
  color: var(--ink-2);
}

.result-block p + p {
  margin-top: 8px;
}

.result-fees {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  overflow: hidden;
}

.result-fees li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 14px;
  font-size: 15px;
}

.result-fees li:nth-child(odd) {
  background: var(--cobalt-faint);
}

.result-fees .rf-amt {
  font-family: var(--display);
  font-stretch: 112.5%;
  font-weight: 600;
  color: var(--cobalt);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.result-fees .rf-flux {
  color: var(--ink);
}

.result-moves {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 15px;
  border: 1.5px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.check:hover {
  border-color: var(--cobalt-line);
  background: var(--cobalt-soft);
}

.check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.check-box {
  flex-shrink: 0;
  width: 23px;
  height: 23px;
  margin-top: 1px;
  border-radius: 7px;
  border: 2.5px solid var(--line-2);
  background: #fff;
  position: relative;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.check input:checked ~ .check-box {
  background: var(--cobalt);
  border-color: var(--cobalt);
}

.check input:checked ~ .check-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2.5px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.check input:focus-visible ~ .check-box {
  outline: 3px solid var(--cobalt);
  outline-offset: 2px;
}

.check-text {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.15s ease;
}

.check input:checked ~ .check-text {
  color: var(--faint);
  text-decoration: line-through;
  text-decoration-color: var(--line-2);
}

.result-disclaimer {
  margin-top: 22px;
  padding: 11px 15px;
  border-left: 4px solid var(--marigold);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: var(--marigold-soft);
  font-size: 14px;
  color: var(--ink-2);
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ---------- fees ---------- */

.fees-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}

.fee-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: #fff;
}

.fee-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  border-bottom: 1.5px solid var(--line);
  transition: background-color 0.15s ease;
}

.fee-row:last-child {
  border-bottom: 0;
}

.fee-row:hover {
  background: var(--cobalt-soft);
}

.fee-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

.fee-name small {
  display: block;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--faint);
  margin-top: 2px;
}

.fee-payer {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1.5px solid var(--line-2);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.fee-amt {
  font-family: var(--display);
  font-stretch: 112.5%;
  font-weight: 600;
  font-size: clamp(19px, 2vw, 24px);
  letter-spacing: -0.01em;
  color: var(--cobalt);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.fee-amt small {
  display: block;
  font-family: var(--body);
  font-stretch: 100%;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--faint);
  letter-spacing: 0;
  text-align: right;
  white-space: normal;
  max-width: 200px;
  margin-top: 2px;
}

.fee-or {
  font-family: var(--body);
  font-stretch: 100%;
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
}

.fee-row-flux {
  background: #fffdf4;
  border-left: 5px solid var(--marigold);
}

.fee-row-flux:hover {
  background: var(--marigold-soft);
}

.fee-row-flux .fee-amt {
  color: var(--ink);
}

.fees-notes {
  display: grid;
  gap: 14px;
}

.note-card {
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-m);
  background: #fff;
  padding: 19px 21px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.note-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(23, 67, 207, 0.1);
}

.note-card h3 {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 7px;
}

.note-card p {
  font-size: 14.5px;
  color: var(--muted);
}

.note-warn {
  border-color: var(--marigold-line);
  background: var(--marigold-soft);
}

.note-warn p {
  color: var(--ink-2);
}

/* ---------- season strip ---------- */

.cal-strip {
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  border-radius: var(--radius-m);
}

.cal {
  list-style: none;
  margin: 0;
  padding: 2px;
  display: grid;
  grid-template-columns: repeat(12, minmax(104px, 1fr));
  gap: 8px;
  min-width: 1280px;
}

.cal-month {
  border: 1.5px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  padding: 13px 12px 12px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.cal-month:hover {
  transform: translateY(-3px);
  box-shadow: 4px 5px 0 rgba(23, 67, 207, 0.1);
  border-color: var(--cobalt-line);
}

.cal-m {
  font-family: var(--display);
  font-stretch: 112.5%;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.cal-note {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--faint);
}

.cal-sub {
  margin-top: auto;
}

.cal-event {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.cal-cobalt {
  background: var(--cobalt);
  color: #fff;
}

.cal-outline {
  background: var(--cobalt-soft);
  border: 1.5px solid var(--cobalt);
  color: var(--cobalt-ink);
}

.cal-marigold {
  background: var(--marigold);
  color: var(--ink);
}

.cal-strong {
  font-family: var(--display);
  font-stretch: 112.5%;
  font-size: 14px;
  font-weight: 600;
}

.cal-gap {
  border-top: 5px solid var(--marigold);
}

.cal-hot {
  border-color: var(--cobalt-line);
  background: #fbfcff;
}

.cal-legend {
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-2);
}

.legend-key {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: -1px;
}

.legend-cobalt {
  background: var(--marigold);
}

/* ---------- datasets ---------- */

.data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.data-card {
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-m);
  background: #fff;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.data-card:hover {
  transform: translate(-2px, -2px);
  border-color: var(--cobalt-line);
  box-shadow: 6px 6px 0 rgba(23, 67, 207, 0.11);
}

.data-pub {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.data-card h3 {
  font-size: 20px;
  letter-spacing: -0.015em;
}

.data-desc {
  font-size: 15px;
  color: var(--muted);
  flex: 1;
}

.cadence-chip {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--cobalt-soft);
  border: 1.5px solid var(--cobalt-line);
  color: var(--cobalt-ink);
  font-size: 12.5px;
  font-weight: 700;
}

.data-links {
  font-size: 15px;
  font-weight: 700;
}

.data-links a::after {
  content: " ↗";
  font-size: 0.85em;
}

.data-sep {
  margin: 0 9px;
  color: var(--line-2);
}

.data-unofficial {
  margin-bottom: 30px;
  padding: 14px 18px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius-s);
  font-size: 15px;
  color: var(--muted);
  max-width: 760px;
}

/* ---------- LCA sample ---------- */

.lca-sample {
  margin: 0;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-m);
  background: #fff;
  overflow: hidden;
  max-width: 900px;
}

.lca-sample figcaption {
  padding: 16px 22px;
  border-bottom: 1.5px solid var(--line);
  font-family: var(--display);
  font-stretch: 112.5%;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.lca-illo {
  display: block;
  font-family: var(--body);
  font-stretch: 100%;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--faint);
  margin-top: 3px;
}

.lca-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1.5px solid var(--line);
}

.lca-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
}

.lca-cell:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.lca-cell:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.lca-k {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--faint);
  text-transform: uppercase;
}

.lca-v {
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--ink);
  word-break: break-word;
}

.lca-ref {
  color: var(--cobalt);
  font-weight: 700;
  text-decoration: none;
  font-family: var(--body);
}

.lca-ref:hover {
  text-decoration: underline;
}

.lca-notes {
  margin: 0;
  padding: 16px 22px 18px 44px;
  display: grid;
  gap: 7px;
  font-size: 14px;
  color: var(--muted);
}

.lca-notes li::marker {
  font-weight: 700;
  color: var(--cobalt);
}

/* ---------- glossary ---------- */

.glossary-tools {
  max-width: 560px;
  margin-bottom: 26px;
}

.glossary-tools label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}

.glossary-searchbox {
  display: flex;
  align-items: center;
  gap: 14px;
}

#glossary-search {
  flex: 1;
  min-width: 0;
  padding: 13px 17px;
  border: 1.5px solid var(--line-2);
  border-radius: 10px;
  font-family: var(--body);
  font-size: 16.5px;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#glossary-search:hover {
  border-color: var(--cobalt-line);
}

#glossary-search:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 4px 4px 0 rgba(23, 67, 207, 0.13);
}

.glossary-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--faint);
  white-space: nowrap;
}

.glossary {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.term details {
  border: 1.5px solid var(--line-2);
  border-radius: 11px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.term details:hover {
  border-color: var(--cobalt-line);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(23, 67, 207, 0.09);
}

.term details[open] {
  border-color: var(--cobalt);
  box-shadow: 4px 4px 0 rgba(23, 67, 207, 0.12);
}

.term summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.term summary::-webkit-details-marker {
  display: none;
}

.term summary:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: -3px;
  border-radius: 11px;
}

.term-name {
  font-family: var(--display);
  font-stretch: 112.5%;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.term-aka {
  font-size: 13px;
  color: var(--faint);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.term-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  color: var(--muted);
  transition: transform 0.2s ease, background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}

.term details[open] .term-toggle {
  transform: rotate(180deg);
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
}

.term p {
  padding: 0 16px 15px;
  font-size: 15px;
  color: var(--ink-2);
  border-top: 1.5px dashed var(--line);
  padding-top: 12px;
  margin: 0 16px;
  padding-left: 0;
  padding-right: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .term details[open] p {
    animation: play-open 0.28s cubic-bezier(0.22, 0.9, 0.3, 1);
  }
}

.glossary-empty {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius-s);
  color: var(--muted);
  font-size: 15px;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .fees-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .fee-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name amt"
      "payer amt";
    row-gap: 8px;
  }

  .fee-name {
    grid-area: name;
  }

  .fee-payer {
    grid-area: payer;
    justify-self: start;
  }

  .fee-amt {
    grid-area: amt;
    align-self: center;
  }

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

  .lca-cell:nth-child(odd) {
    border-right: 0;
  }

  .lca-cell:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .lca-cell:last-child {
    border-bottom: 0;
  }

  .wizard-actions .btn {
    flex: 1;
  }

  .wizard-actions .btn-next {
    margin-left: 0;
  }
}
