/* Loaded after the main stylesheet so viewport safety cannot be overridden. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

/* Public single-page webbooks */
.webbook-content .webbook-public { max-width: 100%; }
.webbook-disclosure {
  margin: 0 0 38px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--line));
  border-radius: 20px;
  background: linear-gradient(135deg, #eef7f1, #fbfaf6);
}
.webbook-disclosure strong { display: block; margin-bottom: 10px; color: var(--green-dark); font-size: 19px; }
.webbook-disclosure p { margin: 7px 0 0; color: #45554d; font-size: 14px; line-height: 1.75; }
.webbook-toc {
  margin: 44px 0 64px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #f7f5ef;
}
.webbook-content .webbook-toc h2 { margin: 0 0 22px; }
.webbook-toc ol { columns: 2; column-gap: 48px; margin: 0; padding-left: 24px; }
.webbook-toc li { break-inside: avoid; margin: 0 0 10px; padding-left: 5px; }
.webbook-toc a { color: var(--green-dark); text-decoration: underline; text-decoration-color: #b6c9bf; text-underline-offset: 4px; }
.webbook-chapter { padding-top: 20px; scroll-margin-top: 28px; }
.webbook-content .webbook-chapter > h2 { margin-top: 72px; padding-top: 30px; border-top: 2px solid var(--ink); }
.webbook-back-to-toc { display: inline-flex; margin: 34px 0 4px; padding: 9px 14px; border-radius: 999px; color: var(--green); background: #edf5f0; font-size: 13px; font-weight: 800; }
.webbook-content a[target="_blank"] { text-decoration: underline; text-decoration-color: #a7bfb3; text-underline-offset: 3px; }

@media (max-width: 700px) {
  .webbook-toc ol { columns: 1; }
  .webbook-content .webbook-chapter > h2 { margin-top: 54px; }
}

@media (max-width: 760px) {
  .site-chrome .site-header,
  .site-header {
    width: calc(100% - 28px);
    height: auto;
    min-height: 74px;
    padding: 0 0 10px;
    flex-wrap: wrap;
    gap: 14px;
  }

  .site-chrome .site-header nav,
  .site-header nav {
    width: 100%;
    max-width: 100%;
    order: 3;
    display: flex;
    gap: 8px;
    padding: 4px 0 2px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-width: none;
  }

  .site-chrome .site-header nav > ul,
  .site-header nav > ul {
    flex: 0 0 auto;
    width: max-content;
    gap: 8px;
  }

  .site-chrome .site-header nav::-webkit-scrollbar,
  .site-header nav::-webkit-scrollbar { display: none; }

  .site-chrome .site-header nav a,
  .site-header nav a {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 9px 13px;
    border: 1px solid rgba(14, 107, 78, .14);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background: #fff;
    scroll-snap-align: start;
  }

  .site-chrome .header-cta,
  .site-header .header-cta {
    margin-left: auto;
    min-height: 44px;
    padding: 9px 13px;
    display: inline-flex !important;
    align-items: center;
  }

  .quick-searches a {
    min-height: 44px;
    padding: 9px 12px;
    display: inline-flex;
    align-items: center;
  }

  .brand.brand-v2 {
    min-width: 108px;
  }

  .brand-wordmark strong {
    font-size: 32px;
    letter-spacing: -.085em;
  }

  .portal-hero {
    width: calc(100% - 20px);
    margin-top: 8px;
    padding: 30px 18px 22px;
    border-radius: 24px;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .portal-hero .hero-copy,
  .hero-editorial-card,
  .portal-hero .today-board {
    min-width: 0;
    width: 100%;
    grid-column: 1;
  }

  .portal-hero .hero-copy {
    max-width: 100%;
    overflow: hidden;
  }

  .portal-hero h1 {
    max-width: 100%;
    font-size: clamp(39px, 11.8vw, 50px);
    line-height: 1.08;
    letter-spacing: -.07em;
    overflow-wrap: anywhere;
  }

  .hero-description {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
    line-height: 1.72;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .portal-search {
    width: 100%;
    min-width: 0;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    padding: 7px;
    border-radius: 18px;
  }

  .portal-search > span {
    display: none;
  }

  .portal-search input {
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
    padding: 11px 12px;
    font-size: 14px;
  }

  .portal-search button {
    flex: 1 1 100%;
    width: 100%;
    min-height: 46px;
  }

  .quick-searches {
    max-width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .hero-editorial-card {
    margin: 0;
    border-width: 4px;
    border-radius: 20px;
  }

  .hero-editorial-card img {
    width: 100%;
    max-width: 100%;
  }

  .hero-editorial-card figcaption {
    display: none;
  }

  .portal-hero .today-board {
    padding: 18px;
    border-radius: 20px;
  }

  .portal-hero .board-heading {
    align-items: flex-start;
    gap: 12px;
  }

  .portal-hero .board-heading time {
    padding-top: 4px;
    white-space: nowrap;
  }

  .portal-hero .board-list {
    grid-template-columns: 1fr;
  }

  .portal-hero .board-list a {
    min-height: 82px;
  }

  .trust-strip {
    width: calc(100% - 36px);
    margin-top: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-strip span {
    justify-content: flex-start;
  }

  .section-wrap {
    width: calc(100% - 28px);
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading h2 {
    max-width: 100%;
  }

  .eroke-method {
    width: calc(100% - 20px);
  }

  .inner-hero { width: 100%; padding: 56px 18px 52px; overflow: hidden; }
  .inner-hero h1, .inner-hero > p:not(.eyebrow) { width: 100%; max-width: 100%; word-break: keep-all; overflow-wrap: break-word; }
  .inner-hero h1 { font-size: clamp(34px, 9.5vw, 43px); }
  .hero-facts, .article-hero-meta { width: 100%; max-width: 100%; justify-content: center; flex-wrap: wrap; }
  .hero-facts span, .article-hero-meta span { max-width: 100%; white-space: normal; }
  .article-shell { width: calc(100% - 28px); margin-top: 46px; grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .article-content, .article-sidebar, .answer-box-v2, .step-list, .step-list li, .caution-box, .chapter-list { min-width: 0; max-width: 100%; }
  .article-content, .article-content p, .answer-box-v2 p, .step-list li { word-break: keep-all; overflow-wrap: break-word; }
  .answer-box-v2 { padding: 24px 20px; }
  .answer-box-v2 p { font-size: 16px; }
  .step-list li { padding: 17px 15px; grid-template-columns: 30px minmax(0, 1fr); }
  .article-sidebar { position: static; grid-template-columns: 1fr; }
  .editorial-hero { width: calc(100% - 20px); margin: -24px auto 38px; border-width: 5px; }
  .guide-list { width: calc(100% - 28px); margin-top: 46px; grid-template-columns: minmax(0, 1fr); }
  .guide-list article, .guide-list article.has-list-image { min-width: 0; min-height: 0; padding: 24px 20px; grid-template-columns: minmax(0, 1fr); }
  .guide-list article > div, .guide-list article h2, .guide-list article p { min-width: 0; max-width: 100%; word-break: keep-all; overflow-wrap: break-word; }
  .guide-list article h2 { font-size: 21px; }
  .search-page-box { width: 100%; height: auto; }
  .webbook-layout, .about-wrap { width: calc(100% - 28px); grid-template-columns: minmax(0, 1fr); gap: 42px; }
  .webbook-sidebar { position: static; }
}

.operational-guide {
  margin-top: 54px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(14, 107, 78, .2);
  border-radius: 24px;
  background: linear-gradient(145deg, #f1f8f3 0%, #fffdf8 100%);
  box-shadow: 0 18px 42px rgba(12, 61, 45, .07);
}

.navigation.pagination .nav-links {
  width: min(1040px, calc(100% - 40px));
  margin: 40px auto 80px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.navigation.pagination .page-numbers {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}
.navigation.pagination .page-numbers.current { border-color: var(--green); color: #fff; background: var(--green); }

.eroke-ad-unit {
  width: 100%;
  min-width: 0;
  margin: 38px 0;
  padding: 10px;
  border: 1px solid #e3e6e2;
  border-radius: 14px;
  overflow: hidden;
  background: #fafaf7;
  contain: layout paint;
}
.eroke-ad-unit > span {
  display: block;
  margin: 0 0 7px;
  color: #5f6f67;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
}
.eroke-ad-in-article .eroke-ad-widget { min-height: 280px; display: grid; place-items: center; }
.eroke-ad-sidebar { margin-top: 18px; }
.eroke-ad-sidebar .eroke-ad-widget { min-height: 250px; display: grid; place-items: center; }
.eroke-ad-widget > * { max-width: 100%; margin-inline: auto; }
.article-content .operational-guide > h2:first-child { margin-top: 0; }
.operational-guide .table-scroll { max-width: 100%; margin: 22px 0; overflow-x: auto; border-radius: 16px; outline: none; }
.operational-guide .table-scroll:focus-visible { outline: 3px solid rgba(20, 108, 79, .32); outline-offset: 3px; }
.content-table-scroll { max-width: 100%; margin: 24px 0; overflow-x: auto; border-radius: 14px; outline: none; overscroll-behavior-inline: contain; }
.content-table-scroll:focus-visible { outline: 3px solid rgba(20, 108, 79, .32); outline-offset: 3px; }
.article-content .operational-guide table { width: 100%; min-width: 680px; margin: 0; border-collapse: collapse; background: #fff; }
.article-content .operational-guide th,
.article-content .operational-guide td { padding: 15px 16px; border: 1px solid #dfe8e2; text-align: left; vertical-align: top; }
.article-content .operational-guide th { color: var(--green-dark); background: #eaf4ed; font-size: 13px; }
.completion-proof, .operational-caution { margin: 18px 0 0; padding: 16px 18px; border-radius: 14px; }
.completion-proof { border-left: 4px solid var(--green); background: #fff; }
.operational-caution { border-left: 4px solid var(--coral); background: #fff6f1; }
.article-content .section-divider {
  width: 100%;
  height: 1px;
  margin: 34px 0;
  border: 0;
  background: linear-gradient(90deg, var(--green), rgba(20, 108, 79, .12) 42%, transparent);
}
@media (max-width: 760px) {
  .operational-guide { margin-top: 42px; padding: 20px 16px; border-radius: 20px; }
  .operational-guide .table-scroll::after { content: "표를 좌우로 밀어 확인하세요 →"; display: block; padding: 9px 4px 0; color: var(--muted); font-size: 12px; font-weight: 750; }
  .content-table-scroll::after { content: "표를 좌우로 밀어 확인하세요 →"; display: block; padding: 9px 4px 0; color: var(--muted); font-size: 12px; font-weight: 750; }
}

/* Readability floor for meaningful microcopy left by legacy visual layers. */
.answer-box-v2 strong span,
.side-label {
  font-size: var(--type-caption, 12px);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .footer-nav-group a,
  .footer-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid #426fc8;
  outline-offset: 3px;
}

/* Respect operating-system motion preferences in the production theme. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Application guides remain useful when printed or saved as a PDF. */
@media print {
  @page { margin: 16mm; }
  html, body { background: #fff !important; color: #111 !important; }
  body { font-size: 11pt; line-height: 1.65; }
  .site-header,
  .site-footer,
  .article-sidebar,
  .article-action-panel,
  .eroke-ad-unit,
  .post-navigation,
  .related-guides,
  .quick-searches,
  .screen-reader-text,
  .editorial-hero { display: none !important; }
  .inner-hero,
  .article-shell,
  .article-content,
  .about-wrap,
  .webbook-reading-shell,
  .webbook-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }
  .inner-hero { padding-bottom: 8mm !important; }
  .inner-hero h1 { color: #111 !important; font-size: 24pt; }
  .article-content,
  .article-content p,
  .article-content li,
  .webbook-content,
  .webbook-content p,
  .webbook-content li { color: #111 !important; }
  .article-content a,
  .webbook-content a { color: #111 !important; text-decoration: underline; }
  .article-content a[href^="http"]::after,
  .webbook-content a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8.5pt;
    font-weight: 400;
    overflow-wrap: anywhere;
  }
  h2, h3 { break-after: avoid-page; page-break-after: avoid; }
  table, figure, blockquote, .answer-box-v2, .operational-guide, .step-list li {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }
  .content-table-scroll,
  .operational-guide .table-scroll { overflow: visible !important; }
  .article-content .operational-guide table { min-width: 0; font-size: 9pt; }
}
