/* ============================================================
   HKOEA — Charts & Tables (salary bands, comparison)
   ============================================================ */

/* ---- 薪酬對照表 ---- */
.salary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.salary-table thead th {
  text-align: left;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--line2);
  white-space: nowrap;
}

.salary-table tbody td {
  padding: 14px;
  border-bottom: var(--hair);
  color: var(--ink2);
  vertical-align: middle;
}

.salary-table tbody tr:hover td {
  background: var(--panel);
}

.salary-table tbody td:first-child {
  color: var(--ink);
  font-weight: 500;
}

.salary-table .num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: var(--hair);
  border-radius: var(--radius);
  background: var(--panel);
}

.table-scroll .salary-table thead th:first-child,
.table-scroll .salary-table tbody td:first-child {
  padding-left: 20px;
}

.table-scroll .salary-table thead th:last-child,
.table-scroll .salary-table tbody td:last-child {
  padding-right: 20px;
}

/* ---- 薪酬長條圖 ---- */
.band-chart {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.band-row {
  display: grid;
  grid-template-columns: 210px 1fr 92px;
  align-items: center;
  gap: 16px;
}

.band-row__label {
  font-size: 0.87rem;
  color: var(--ink2);
  line-height: 1.35;
}

.band-row__label b {
  display: block;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9rem;
}

.band-row__label span {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.band-row__track {
  position: relative;
  height: 8px;
  background: var(--panel2);
  border-radius: 999px;
  border: 1px solid var(--line2);
}

.band-row__fill {
  position: absolute;
  inset-block: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-dk), var(--gold));
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 1.1s var(--ease);
}

.band-row.is-in .band-row__fill {
  transform: scaleX(1);
}

.band-row__val {
  font-size: 0.82rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* 時薪職位（兼職）不符月薪刻度，以虛線邊框標示，
   並在數值下方加註計薪單位，避免與上方月薪區間混淆。 */
.band-row--hourly .band-row__track {
  border-style: dashed;
}

.band-row--hourly .band-row__fill {
  background: linear-gradient(90deg, var(--line2), var(--ink3, #8a8a8a));
  opacity: 0.55;
}

.band-row__unit {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

/* ---- 對照雙欄 ---- */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line2);
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare > div {
  background: var(--bg);
  padding: clamp(22px, 2.6vw, 32px);
}

.compare h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.compare h3 .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.compare--good h3 .dot {
  background: var(--gold);
}

.compare--bad h3 .dot {
  background: var(--muted);
}

.compare ul {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.compare li {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink2);
  padding-left: 18px;
  position: relative;
}

.compare li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.compare--good li::before {
  content: "✓";
  color: var(--gold);
}

/* ---- 表單 ---- */
.form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 0.8rem;
  color: var(--ink2);
  font-weight: 500;
  letter-spacing: 0.005em;
}

.field label .req {
  color: var(--gold);
  margin-left: 3px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.93rem;
  transition: border-color 0.22s var(--ease), background-color 0.22s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.field textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.55;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2395959f' stroke-width='2.6'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
  cursor: pointer;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--line);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 180, 81, 0.14);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.72;
}

.form-note {
  font-size: 0.79rem;
  color: var(--muted);
  line-height: 1.55;
}

.form-status {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  border: 1px solid var(--line);
  color: var(--gold);
  background: rgba(217, 180, 81, 0.07);
  display: none;
}

.form-status.is-on {
  display: block;
}

/* ---- 兩欄配置 ---- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4.5vw, 72px);
  align-items: start;
}

.split--wide {
  grid-template-columns: 1.35fr 1fr;
}

/* ---- 公開招聘區：兩欄等高 ----
   .split 預設 align-items:start，令右側卡片比左欄高出一截、底部留白。
   此處改為 stretch，並讓卡片以 flex 撐滿高度，四種主題／語言組合下高度差歸零。 */
.split--equal {
  align-items: stretch;
}
.split--equal > * {
  min-height: 0;
}
.split--equal .card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sticky-col {
  position: sticky;
  top: 100px;
}

/* ---- 清單 ---- */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.check-list li {
  display: flex;
  gap: 13px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink2);
}

.check-list li svg {
  flex-shrink: 0;
  margin-top: 4px;
  color: var(--gold);
}

/* ---- 數字列表 ---- */
.num-list {
  counter-reset: nl;
  display: flex;
  flex-direction: column;
}

.num-list li {
  counter-increment: nl;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
  padding-block: 22px;
  border-bottom: var(--hair);
}

.num-list li:first-child {
  border-top: var(--hair);
}

.num-list li::before {
  content: counter(nl, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  padding-top: 4px;
}

.num-list b {
  display: block;
  font-size: 1rem;
  font-weight: 550;
  margin-bottom: 7px;
}

.num-list p {
  font-size: 0.9rem;
  color: var(--ink2);
  line-height: 1.6;
}

/* ---- 響應式 ---- */
@media (max-width: 900px) {
  .split,
  .split--wide {
    grid-template-columns: 1fr;
  }

  .sticky-col {
    position: static;
  }

  .band-row {
    grid-template-columns: 130px 1fr 78px;
    gap: 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

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

  .band-row {
    grid-template-columns: 1fr 76px;
    row-gap: 8px;
  }

  .band-row__track {
    grid-column: 1 / -1;
    order: 3;
  }
}
