/* =========================================================
   Long-form page blocks
   Plain CSS on purpose: the Tailwind bundle is pre-compiled,
   so new utility classes would not exist unless rebuilt.
   ========================================================= */

.hds-block {
  padding: 5rem 0;
  background: #ffffff;
}

.hds-block--tint {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.hds-wrap {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .hds-wrap { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .hds-wrap { padding: 0 2rem; }
}

/* ---------- Overview ---------- */

.hds-block-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .hds-block-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr);
    gap: 3.5rem;
    align-items: start;
  }
}

.hds-block-head {
  position: relative;
}

.hds-block-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #0f172a;
}

@media (min-width: 640px) {
  .hds-block-title { font-size: 1.75rem; }
}

.hds-block-title--center {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hds-block-head .hds-block-title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin-top: 1rem;
  border-radius: 999px;
  background: #2563eb;
}

.hds-prose p {
  margin: 0 0 1.15rem;
  font-size: 1rem;
  line-height: 1.8;
  color: #334155;
}

.hds-prose p:last-child {
  margin-bottom: 0;
}

@media (min-width: 640px) {
  .hds-prose p { font-size: 1.0625rem; }
}

/* ---------- Reference table ---------- */

.hds-table-scroll {
  width: 100%;
  overflow-x: auto;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  -webkit-overflow-scrolling: touch;
}

.hds-table {
  width: 100%;
  min-width: 46rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  text-align: left;
}

.hds-table thead th {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.9rem 1.15rem;
  white-space: nowrap;
  border-bottom: 1px solid #e2e8f0;
}

.hds-table tbody th {
  padding: 0.9rem 1.15rem;
  color: #0f172a;
  font-weight: 600;
  vertical-align: top;
  border-bottom: 1px solid #eef2f7;
  background: #fcfdff;
}

.hds-table tbody td {
  padding: 0.9rem 1.15rem;
  color: #475569;
  vertical-align: top;
  line-height: 1.65;
  border-bottom: 1px solid #eef2f7;
}

.hds-table tbody tr:last-child th,
.hds-table tbody tr:last-child td {
  border-bottom: 0;
}

.hds-table tbody tr:hover td,
.hds-table tbody tr:hover th {
  background: #f8fbff;
}

/* ---------- FAQ ---------- */

.hds-faq {
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hds-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  background: #ffffff;
  padding: 0 1.15rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hds-faq-item:hover {
  border-color: #bfdbfe;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.07);
}

.hds-faq-item[open] {
  border-color: #bfdbfe;
  background: #fbfdff;
}

.hds-faq-q {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 2rem 1.05rem 0;
  position: relative;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.55;
  color: #0f172a;
}

.hds-faq-q::-webkit-details-marker {
  display: none;
}

.hds-faq-q::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
}

.hds-faq-item[open] .hds-faq-q::after {
  content: "–";
}

.hds-faq-a {
  padding: 0 0 1.15rem;
  border-top: 1px solid #eef2f7;
  margin-top: -0.15rem;
}

.hds-faq-a p {
  margin: 0.9rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: #475569;
}

/* ---------- Language-specific type tuning ---------- */

html[lang="ja"] .hds-prose p,
html[lang="ko"] .hds-prose p,
html[lang="zh-CN"] .hds-prose p,
html[lang="zh-HK"] .hds-prose p {
  line-height: 1.9;
  letter-spacing: 0.01em;
}

html[lang="th"] .hds-prose p,
html[lang="th"] .hds-table tbody td {
  line-height: 1.9;
}

/* ---------- Print ---------- */

@media print {
  .hds-block { padding: 1.5rem 0; }
  .hds-faq-item { break-inside: avoid; }
  .hds-table-scroll { overflow: visible; }
}

/* ---------- Mobile: stack reference tables instead of scrolling ---------- */

@media (max-width: 640px) {
  .hds-table-scroll {
    border: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }

  .hds-table {
    min-width: 0;
    display: block;
  }

  .hds-table thead {
    display: none;
  }

  .hds-table tbody {
    display: block;
  }

  .hds-table tbody tr {
    display: block;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.9rem 1rem;
    margin-bottom: 0.75rem;
  }

  .hds-table tbody th,
  .hds-table tbody td {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
  }

  .hds-table tbody th {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
  }

  .hds-table tbody td {
    font-size: 0.875rem;
    padding-bottom: 0.3rem;
    color: #475569;
  }

  .hds-table tbody td:last-child {
    padding-bottom: 0;
  }

  .hds-table tbody tr:hover th,
  .hds-table tbody tr:hover td {
    background: transparent;
  }
}

/* ---------- Mobile: stack reference tables instead of scrolling ---------- */

@media (max-width: 640px) {
  .hds-table-scroll {
    border: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }

  .hds-table {
    min-width: 0;
    display: block;
  }

  .hds-table thead {
    display: none;
  }

  .hds-table tbody {
    display: block;
  }

  .hds-table tbody tr {
    display: block;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.9rem 1rem;
    margin-bottom: 0.75rem;
  }

  .hds-table tbody th,
  .hds-table tbody td {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
  }

  .hds-table tbody th {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
  }

  .hds-table tbody td {
    font-size: 0.875rem;
    padding-bottom: 0.3rem;
    color: #475569;
  }

  .hds-table tbody td:last-child {
    padding-bottom: 0;
  }

  .hds-table tbody tr:hover th,
  .hds-table tbody tr:hover td {
    background: transparent;
  }
}
