:root {
  color-scheme: light;
  --navy: #0b2239;
  --navy-soft: #183c5d;
  --teal: #177c7a;
  --bg: #f7f9fa;
  --panel: #ffffff;
  --line: #dde5e8;
  --text: #1d2d3d;
  --muted: #63717f;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif !important;
}

::selection {
  background: #c9e9e5;
  color: #0b2239;
}

button,
input,
select,
textarea {
  font: inherit;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(23, 124, 122, 0.42) !important;
  outline-offset: 2px !important;
}

.law-page,
main.reader {
  color: var(--text);
}

.law-head h1,
.law-detail h2,
.sec-title,
header.top h1 {
  letter-spacing: -0.025em;
}

header.top,
.law-scope-btn.is-on,
.law-btn:not(.law-btn--ghost) {
  background: var(--navy) !important;
}

.law-card,
.law-detail,
.law-status,
.tool-guide,
.page-text,
.results {
  border-color: var(--line) !important;
  box-shadow: 0 18px 42px -38px rgba(11, 34, 57, 0.6);
}

.law-card:hover,
.law-card:focus-visible {
  border-color: #8fc9c4 !important;
  box-shadow: 0 18px 38px -26px rgba(11, 34, 57, 0.52) !important;
}

.policy-note {
  color: #697884 !important;
}

.seoryu-search-skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100010;
  transform: translateY(calc(-100% - 16px));
  padding: 10px 14px;
  border-radius: 8px;
  background: #ffffff;
  color: #0b2239;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(11, 34, 57, 0.2);
  transition: transform 0.15s ease;
}

.seoryu-search-skip:focus {
  transform: translateY(0);
}

@media (max-width: 760px) {
  .law-page {
    padding-inline: 1rem !important;
  }

}

.search-tool-embedded #platform-home-btn {
  display: none !important;
}

.search-tool-embedded,
.search-tool-embedded body {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.search-tool-embedded.search-tool-handbook body {
  display: block !important;
}

.search-tool-embedded.search-tool-handbook body > .layout {
  align-items: stretch !important;
  flex: none !important;
  height: var(--seoryu-handbook-layout-height, 620px) !important;
  min-height: 0 !important;
}

.search-tool-embedded.search-tool-handbook aside.toc,
.search-tool-embedded.search-tool-handbook main.reader {
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
}

.search-tool-embedded.search-tool-handbook main.reader {
  display: flex !important;
}

.search-tool-embedded.search-tool-handbook .page-text {
  flex: 1 !important;
  min-height: 0 !important;
  overflow: auto !important;
}

.search-tool-embedded.search-tool-handbook .results {
  overflow: auto !important;
}

.search-tool-embedded.search-tool-handbook aside.toc {
  overflow: visible !important;
}

.search-tool-embedded .law-pop-overlay,
.search-tool-embedded .plr-overlay {
  position: absolute !important;
  inset: var(--seoryu-popup-top, 16px) 12px auto 12px !important;
  z-index: 100200 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  animation: none !important;
}

.search-tool-embedded .law-pop-card,
.search-tool-embedded .plr-card {
  max-height: var(--seoryu-popup-max-height, 680px) !important;
  pointer-events: auto;
}

@media (max-width: 760px) {
  .search-tool-embedded.search-tool-handbook body > .layout {
    flex: none !important;
    height: var(--seoryu-handbook-layout-height, 680px) !important;
  }

  .search-tool-embedded.search-tool-handbook aside.toc {
    height: auto !important;
    max-height: 45vh !important;
    overflow: auto !important;
  }

  .search-tool-embedded.search-tool-handbook main.reader {
    flex: 1 !important;
    height: auto !important;
  }

  .search-tool-embedded .law-pop-overlay,
  .search-tool-embedded .plr-overlay {
    inset-inline: 8px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .seoryu-search-skip {
    display: none !important;
  }
}
