/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "BENEOX Body", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #232832;
  background: #fff;
}
.article-content a { color: #1a73e8; text-decoration: none; }
.article-content a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4 { font-family: "BENEOX Heading", "BENEOX Body", Arial, sans-serif; font-weight: 700; line-height: 1.3; }
h1 { font-size: 2.4rem; margin-bottom: .5rem; }
h2 { font-size: 1.6rem; margin: 2rem 0 .8rem; scroll-margin-top: 112px; }
h3 { font-size: 1.2rem; margin: 1.5rem 0 .6rem; }
p  { margin-bottom: 1rem; }

/* ===== Layout ===== */
.page-wrap {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
}
.article-main {
  width: 100%;
  min-width: 0;
}

/* ===== Floating article nav ===== */
.article-toc[hidden] { display: none; }
.article-toc {
  display: block;
}
.article-toc__panel {
  border: 1px solid rgba(133, 182, 214, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 249, 0.92)),
    #fff;
  box-shadow: 0 18px 44px rgba(23, 23, 23, 0.08);
  overflow: hidden;
  backdrop-filter: blur(16px);
}
.article-toc__eyebrow {
  margin: 0;
  padding: 18px 20px 14px;
  color: #3d3e45;
  font-family: "BENEOX Heading", "BENEOX Body", Arial, sans-serif;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(61, 62, 69, 0.1);
}
.article-toc__nav {
  max-height: min(58vh, 520px);
  overflow-y: auto;
  padding: 12px 8px 14px;
}
.article-toc__nav::-webkit-scrollbar { width: 6px; }
.article-toc__nav::-webkit-scrollbar-thumb {
  background: rgba(95, 159, 199, 0.34);
  border-radius: 999px;
}
.article-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: article-section;
}
.article-toc__item {
  counter-increment: article-section;
  margin: 2px 0;
}
.article-toc__link {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 8px;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #62656d;
  font-size: .86rem;
  line-height: 1.35;
  transition: background-color 180ms ease, color 180ms ease;
}
.article-toc__link::before {
  content: counter(article-section, decimal-leading-zero);
  color: #8aa9bc;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.55;
}
.article-toc__link::after {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: #5f9fc7;
  opacity: 0;
  transform: scaleY(.4);
  transition: opacity 180ms ease, transform 180ms ease;
}
.article-toc__link:hover {
  color: #3d3e45;
  background: rgba(133, 182, 214, 0.1);
  text-decoration: none;
}
.article-toc__link.is-active {
  color: #171717;
  background: rgba(237, 243, 246, 0.86);
}
.article-toc__link.is-active::after {
  opacity: 1;
  transform: scaleY(1);
}

@media (min-width: 1500px) {
  .page-wrap {
    display: grid;
    grid-template-columns: 0 minmax(0, 1fr);
    align-items: start;
  }
  .article-toc {
    position: sticky;
    top: 150px;
    z-index: 20;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: 218px;
    margin-left: max(calc(608px - 50vw), -268px);
  }
  .article-main {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 1499px) {
  .article-toc {
    margin: 0 0 28px;
  }
  .article-toc__panel {
    box-shadow: 0 14px 32px rgba(23, 23, 23, 0.06);
  }
  .article-toc__nav {
    max-height: none;
  }
  .article-toc__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
}

/* ===== Post meta ===== */
.post-date {
  color: #888;
  font-size: .9rem;
  margin-bottom: 2rem;
}

/* ===== Article content ===== */
.article-content ul,
.article-content ol {
  margin: 0 0 1rem 1.5rem;
  padding-left: 1.2rem;
}
.article-content ul {
  list-style: disc;
}
.article-content ol {
  list-style: decimal;
}
.article-content ul ul {
  list-style: circle;
}
.article-content ul ul ul {
  list-style: square;
}
.article-content li {
  margin: .25rem 0;
  padding-left: .15rem;
  line-height: 1.7;
}
.article-content img {
  margin-left: auto;
  margin-right: auto;
}
.article-content figure,
.article-content .wp-block-image {
  text-align: center;
}
.article-content figure { margin: 1.5rem 0; }
.article-content figure img { border-radius: 6px; }
.article-content .alignleft,
.article-content .alignright,
.article-content .aligncenter {
  float: none;
  margin-left: auto;
  margin-right: auto;
}
.article-content figcaption {
  font-size: .85rem;
  color: #666;
  text-align: center;
  margin-top: .4rem;
  font-style: italic;
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .95rem;
}
.article-table-scroll {
  max-width: 100%;
  margin: 1.5rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.article-table-scroll table {
  margin: 0;
}
.article-table-scroll:focus {
  outline: 2px solid rgba(95, 159, 199, 0.45);
  outline-offset: 2px;
}
.article-table-scroll::-webkit-scrollbar {
  height: 8px;
}
.article-table-scroll::-webkit-scrollbar-thumb {
  background: rgba(95, 159, 199, 0.38);
  border-radius: 999px;
}
.article-content table td,
.article-content table th {
  border: 1px solid #ddd;
  padding: 10px 14px;
  vertical-align: top;
}
.article-content table tr:first-child td {
  background: #f5f7fa;
  font-weight: 600;
}
.wp-block-columns {
  display: flex;
  gap: 16px;
  margin: 1.5rem 0;
}
.wp-block-column { flex: 1; min-width: 0; }

/* ===== Recommended articles ===== */
.article-recommended {
  width: min(1200px, calc(100% - 40px));
  margin: 18px auto 28px;
}
.article-recommended__head {
  margin-bottom: 22px;
}
.article-recommended__head h2 {
  margin: 0;
  color: #171717;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.15;
}
.article-recommended__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.article-recommended__card {
  min-width: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(133, 182, 214, 0.28);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(23, 23, 23, 0.06);
}
.article-recommended__image {
  display: block;
  aspect-ratio: 1.38;
  overflow: hidden;
  background: #edf3f6;
}
.article-recommended__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms ease;
}
.article-recommended__card:hover .article-recommended__image img {
  transform: scale(1.035);
}
.article-recommended__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 22px;
}
.article-recommended__date {
  margin: 0 0 12px;
  color: #718091;
  font-size: .82rem;
}
.article-recommended__body h3 {
  margin: 0;
  color: #171717;
  font-size: 1.18rem;
  line-height: 1.28;
}
.article-recommended__body h3 a {
  color: #171717;
}
.article-recommended__body h3 a:hover {
  color: #5f9fc7;
  text-decoration: none;
}
.article-recommended__body > p:not(.article-recommended__date) {
  margin: 14px 0 20px;
  color: #4b5563;
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.article-recommended__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: auto;
  color: #171717;
  font-size: .9rem;
  font-weight: 800;
}
.article-recommended__link:hover {
  color: #5f9fc7;
  text-decoration: none;
}
.article-recommended__link [data-lucide] {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}
.article-recommended__link:hover [data-lucide] {
  transform: translateX(3px);
}

/* ===== Article inquiry ===== */
.article-inquiry {
  width: min(1200px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 38px;
  align-items: stretch;
  margin: 28px auto 64px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.article-inquiry__visual {
  position: relative;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #dce5ec;
}
.article-inquiry__visual img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-inquiry__copy {
  min-width: 0;
}
.article-inquiry h2 {
  margin: 0 0 16px;
  color: #171717;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.15;
  scroll-margin-top: 112px;
}
.article-inquiry__copy > p {
  max-width: 520px;
  margin: 0;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.7;
}
.article-inquiry__contacts {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}
.article-inquiry__contacts a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: #3d3e45;
  font-weight: 700;
}
.article-inquiry__contacts a:hover {
  color: #5f9fc7;
  text-decoration: none;
}
.article-inquiry__contacts [data-lucide] {
  width: 19px;
  height: 19px;
  color: #5f9fc7;
  stroke-width: 2;
}
.article-inquiry__form {
  display: grid;
  gap: 14px;
}
.article-inquiry__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.article-inquiry__form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #3d3e45;
  font-size: .86rem;
  font-weight: 700;
}
.article-inquiry__form label > span::before {
  content: "* ";
  color: #85b6d6;
  font-weight: 700;
}
.article-inquiry__form input,
.article-inquiry__form textarea {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  border: 1px solid #d4dde3;
  border-radius: 6px;
  padding: 12px 14px;
  color: #171717;
  background: #ffffff;
  outline: none;
  font-weight: 400;
  line-height: 1.4;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.article-inquiry__form textarea {
  min-height: 132px;
  resize: vertical;
}
.article-inquiry__form input:focus,
.article-inquiry__form textarea:focus {
  border-color: #5f9fc7;
  box-shadow: 0 0 0 3px rgba(133, 182, 214, 0.22);
}
.article-inquiry__form input::placeholder,
.article-inquiry__form textarea::placeholder {
  color: #7a828c;
}
.article-inquiry__submit {
  min-height: 50px;
  border: 0;
  border-radius: 6px;
  padding: 0 22px;
  color: #ffffff;
  background: #171717;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: 0;
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}
.article-inquiry__submit:hover {
  background: #3d3e45;
  transform: translateY(-1px);
}
.article-inquiry__submit.is-loading {
  opacity: .72;
  cursor: wait;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .page-wrap {
    width: min(100% - 32px, 720px);
    padding: 28px 0;
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.38rem; }
  .article-toc__eyebrow {
    padding: 15px 16px 12px;
  }
  .article-toc__nav {
    padding: 10px 8px 12px;
  }
  .article-toc__list {
    grid-template-columns: 1fr;
  }
  .article-toc__link {
    min-height: 38px;
    padding: 9px 10px;
  }
  .article-table-scroll table {
    min-width: 640px;
  }
  .wp-block-columns {
    flex-direction: column;
  }
  .article-recommended {
    width: min(100% - 32px, 720px);
    margin-top: 14px;
  }
  .article-recommended__grid {
    grid-template-columns: 1fr;
  }
  .article-recommended__body {
    padding: 20px;
  }
  .article-inquiry {
    width: min(100% - 32px, 720px);
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 14px;
    margin-bottom: 48px;
    padding: 0;
  }
  .article-inquiry__visual {
    min-height: 280px;
  }
  .article-inquiry__row {
    grid-template-columns: 1fr;
  }
  .article-inquiry h2 {
    font-size: 1.65rem;
  }
}
