:root {
  --paper: #fbfaf5;
  --forest: #124d39;
  --green: #47735d;
  --orange: #b65f37;
  --ink: #27322d;
  --muted: #68766f;
  --line: #dce1d9;
  --pale: #f1f4ee;
  --white: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, "SUIT", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong { font-weight: 600; }
img { max-width: 100%; height: auto; }
code { font-family: "SFMono-Regular", Consolas, monospace; font-size: .9em; }

.site-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 max(5vw, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.wordmark { display: flex; align-items: center; color: var(--forest); }
.wordmark strong { font-size: 18px; letter-spacing: -.025em; }
nav { display: flex; flex-wrap: wrap; gap: clamp(18px, 3vw, 34px); color: var(--muted); font-size: 14px; }
nav a, .back-link { padding: 26px 0 22px; border-bottom: 2px solid transparent; }
nav a:hover, nav a:focus-visible, .back-link:hover, .back-link:focus-visible { color: var(--forest); border-color: var(--forest); outline: none; }
nav a[aria-current="page"] { color: var(--forest); border-color: var(--forest); font-weight: 600; }

.library-home, .catalog-page { width: min(1180px, calc(100% - 48px)); min-height: calc(100vh - 126px); margin: 0 auto; }
.library-board, .catalog-layout, .about-catalog {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 7%;
  padding: 52px 0 68px;
}
.library-sidebar, .catalog-sidebar, .about-catalog > aside { align-self: start; display: flex; flex-direction: column; gap: 2px; }
.library-sidebar > p, .catalog-sidebar > p, .about-catalog > aside > p {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 11px;
  letter-spacing: .1em;
}
.library-sidebar a, .catalog-sidebar a, .about-catalog > aside a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.library-sidebar a:hover, .library-sidebar a:focus-visible,
.catalog-sidebar a:hover, .catalog-sidebar a:focus-visible,
.about-catalog > aside a:hover, .about-catalog > aside a:focus-visible { color: var(--forest); outline: none; }
.library-sidebar a.is-current, .catalog-sidebar a.is-current { color: var(--forest); border-bottom-color: var(--forest); font-weight: 600; }
.library-sidebar a strong, .catalog-sidebar a strong { font-size: 11px; font-weight: 500; }
.library-sidebar hr, .catalog-sidebar hr { width: 100%; margin: 26px 0; border: 0; border-top: 1px solid var(--line); }

.home-sections > section + section { margin-top: 54px; }
.home-section-intro, .page-section-intro {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(260px, 1.15fr);
  gap: 8%;
  align-items: end;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--forest);
}
.home-section-intro span, .page-section-intro span, .library-section-heading > div > span {
  color: var(--orange);
  font-size: 10px;
  letter-spacing: .13em;
}
.home-section-intro h1, .page-section-intro h1, .library-section-heading h2 {
  margin-top: 7px;
  color: var(--forest);
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: -.025em;
}
.home-section-intro p, .page-section-intro p { color: var(--muted); font-size: 13px; line-height: 1.75; word-break: keep-all; }
.home-section-intro > p { justify-self: end; max-width: 440px; text-align: right; }
.page-section-intro > p { justify-self: start; text-align: left; }
.catalog-documents .page-section-intro > p { width: 100%; justify-self: start; text-align: left; }
.category-page .catalog-documents .page-section-intro { grid-template-columns: 1fr; gap: 8px; align-items: start; }
.category-page .catalog-documents .page-section-intro > div > p { margin-top: 10px; max-width: none; text-align: left; }

.start-list > a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.start-list b { color: var(--orange); font-size: 11px; font-weight: 500; }
.start-list strong { display: block; margin-bottom: 4px; color: var(--forest); font-size: 15px; }
.start-list small { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; word-break: keep-all; }
.start-list i { color: var(--forest); font-style: normal; text-align: right; }
.start-list > a:hover strong, .start-list > a:focus-visible strong { text-decoration: underline; text-underline-offset: 4px; }
.start-list > a:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }

.library-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 13px; border-bottom: 1px solid var(--forest); }
.library-section-heading h2 { margin-top: 6px; }
.library-section-heading > span, .library-section-heading > a { color: var(--muted); font-size: 11px; }
.collection-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.collection-grid > a { min-height: 182px; display: flex; flex-direction: column; padding: 22px 22px 20px 0; border-right: 1px solid var(--line); }
.collection-grid > a + a { padding-left: 22px; }
.collection-grid > a:last-child { padding-right: 0; border-right: 0; }
.collection-grid span { color: var(--orange); font-size: 10px; }
.collection-grid h3 { margin: 19px 0 8px; color: var(--forest); font-size: 15px; letter-spacing: -.015em; }
.collection-grid p { color: var(--muted); font-size: 12px; line-height: 1.65; word-break: keep-all; }
.collection-grid strong { margin-top: auto; padding-top: 16px; color: var(--green); font-size: 11px; font-weight: 500; }
.collection-grid > a:hover h3, .collection-grid > a:focus-visible h3 { text-decoration: underline; text-underline-offset: 4px; }
.collection-grid > a:focus-visible { outline: 2px solid var(--forest); outline-offset: -2px; }

.document-list { border-top: 0; }
.document-row {
  min-height: 108px;
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.document-row > span, .document-row time { color: var(--green); font-size: 11px; }
.document-row h3 { margin-bottom: 5px; color: var(--forest); font-size: 17px; letter-spacing: -.02em; word-break: keep-all; }
.document-row p { color: var(--muted); font-size: 12px; line-height: 1.65; word-break: keep-all; }
.document-row > strong { color: var(--forest); font-size: 12px; white-space: nowrap; }
.document-row:hover h3, .document-row:focus-visible h3 { text-decoration: underline; text-underline-offset: 5px; }
.document-row:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
.catalog-empty { min-height: 230px; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.catalog-empty p { color: var(--forest); font-size: 17px; font-weight: 600; }
.catalog-empty span { max-width: 620px; color: var(--muted); font-size: 13px; }

.catalog-documents .page-section-intro { margin-bottom: 4px; }
.catalog-documents > .document-list { margin-top: 0; }
.about-section + .about-section { margin-top: 54px; }
.profile-overview { padding: 0; background: transparent; border: 0; }
.profile-overview dl { margin: 30px 0 0; border-top: 1px solid var(--line); }
.profile-overview dl > div { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 22px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.profile-overview dt { color: var(--green); font-size: 12px; }
.profile-overview dd { margin: 0; color: var(--ink); font-size: 13px; }
.profile-information { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.profile-information > p { max-width: 720px; padding-top: 18px; color: var(--muted); font-size: 13px; word-break: keep-all; }
.certification-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.certification-groups > section { min-height: 116px; padding: 20px 24px 20px 0; }
.certification-groups > section + section { padding-left: 24px; border-left: 1px solid var(--line); }
.certification-groups h3 { color: var(--forest); font-size: 14px; font-weight: 600; }
.certification-groups p { margin-top: 12px; color: var(--muted); font-size: 12px; word-break: keep-all; }
.topic-list { padding: 0; background: transparent; border: 0; }
.topic-list ol { margin: 0; padding: 0; list-style: none; }
.topic-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.topic-list li > span { color: var(--orange); font-size: 11px; }
.topic-list li strong { display: block; margin-bottom: 4px; color: var(--forest); font-size: 14px; }
.topic-list li p { color: var(--muted); font-size: 13px; }

.laws-page {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 126px);
  margin: 0 auto;
  padding: 58px 0 84px;
}
.laws-page button, .laws-page input { font: inherit; }
.laws-hero { max-width: 820px; }
.laws-hero .library-kicker { margin-bottom: 12px; }
.laws-hero h1 { color: var(--forest); font-size: clamp(38px, 5vw, 58px); line-height: 1.12; letter-spacing: -.045em; }
.laws-hero > p:last-child { max-width: 720px; margin-top: 20px; color: var(--muted); font-size: 16px; line-height: 1.8; word-break: keep-all; }

.law-search-panel { margin-top: 44px; padding: 30px; border: 1px solid var(--line); background: var(--pale); }
.law-search-heading { display: grid; grid-template-columns: minmax(240px, .9fr) minmax(280px, 1.1fr); gap: 8%; align-items: end; }
.law-search-heading span { color: var(--orange); font-size: 10px; letter-spacing: .13em; }
.law-search-heading h2 { margin-top: 6px; color: var(--forest); font-size: 21px; letter-spacing: -.025em; }
.law-search-heading > p { color: var(--muted); font-size: 12px; line-height: 1.7; word-break: keep-all; }
.law-search-form { margin-top: 27px; }
.law-search-form > label { display: block; margin-bottom: 8px; color: var(--green); font-size: 12px; font-weight: 600; }
.law-scope-bar { display: flex; gap: 20px; margin: 0 0 10px; }
.law-scope-bar button { padding: 3px 0; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.law-scope-bar button:hover, .law-scope-bar button:focus-visible { color: var(--forest); outline: none; border-bottom-color: var(--green); }
.law-scope-bar button.is-active { color: var(--forest); border-bottom-color: var(--forest); font-weight: 600; }
.law-search-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid var(--forest); background: var(--white); }
.law-search-control input { min-width: 0; height: 58px; padding: 0 18px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.law-search-control input::placeholder { color: #89948e; }
.law-search-control input:focus-visible { box-shadow: inset 0 0 0 2px var(--orange); }
.law-search-control button { min-width: 210px; padding: 0 20px; border: 0; background: var(--forest); color: var(--white); font-size: 13px; font-weight: 600; cursor: pointer; }
.law-search-control button:hover, .law-search-control button:focus-visible { background: #0d3f2e; outline: 2px solid var(--orange); outline-offset: 2px; }
.law-search-control button:disabled { background: var(--green); cursor: wait; }
.law-search-control button span { margin-left: 5px; }
.law-search-meta { display: flex; justify-content: space-between; gap: 24px; margin-top: 14px; }
.law-api-status { color: var(--muted); font-size: 12px; }
.law-search-meta > a { flex: none; color: var(--green); font-size: 11px; }
.law-search-meta > a:hover, .law-search-meta > a:focus-visible { color: var(--forest); text-decoration: underline; text-underline-offset: 4px; outline: none; }
.law-noscript { margin-top: 12px; color: var(--orange); font-size: 12px; }
.law-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.law-filter-bar button { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--muted); font-size: 12px; cursor: pointer; }
.law-filter-bar button:hover, .law-filter-bar button:focus-visible { border-color: var(--green); color: var(--forest); outline: none; }
.law-filter-bar button.is-active { border-color: var(--forest); background: var(--forest); color: var(--white); font-weight: 600; }
.law-result-status { margin-top: 18px; color: var(--muted); font-size: 12px; }
.law-result-status strong { color: var(--orange); font-size: 15px; }

.law-results, .law-live-results, .law-viewer { margin-top: 48px; }
.law-live-results[hidden], .law-viewer[hidden] { display: none; }
.law-results-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; padding-bottom: 13px; border-bottom: 1px solid var(--forest); }
.law-results-heading h2 { color: var(--forest); font-size: 21px; letter-spacing: -.025em; }
.law-results-heading > div > span { color: var(--orange); font-size: 10px; letter-spacing: .13em; }
.law-results-heading > div > h2 { margin-top: 5px; }
.law-results-heading > p { color: var(--muted); font-size: 11px; text-align: right; }
.law-live-card { border-bottom: 1px solid var(--line); }
.law-live-open { width: 100%; min-height: 108px; display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 26px; align-items: center; padding: 19px 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.law-live-type { align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding-right: 18px; border-right: 1px solid var(--line); }
.law-live-type span { color: var(--orange); font-size: 11px; font-weight: 600; }
.law-live-type small { color: var(--muted); font-size: 10px; }
.law-live-body h3 { color: var(--forest); font-size: 17px; line-height: 1.45; letter-spacing: -.02em; word-break: keep-all; }
.law-live-body p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.law-live-open > strong { color: var(--green); font-size: 12px; white-space: nowrap; }
.law-live-open:hover h3, .law-live-open:focus-visible h3 { text-decoration: underline; text-underline-offset: 5px; }
.law-live-open:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
.law-live-empty { min-height: 160px; display: flex; align-items: center; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.law-load-more { width: 100%; margin-top: 18px; padding: 13px 18px; border: 1px solid var(--forest); background: transparent; color: var(--forest); font-size: 12px; font-weight: 600; cursor: pointer; }
.law-load-more:hover, .law-load-more:focus-visible { background: var(--forest); color: var(--white); outline: 2px solid var(--orange); outline-offset: 2px; }
.law-load-more[hidden] { display: none; }

.law-viewer { scroll-margin-top: 24px; border: 1px solid var(--forest); background: var(--white); }
.law-viewer-header { display: flex; justify-content: space-between; gap: 26px; align-items: flex-start; padding: 25px 28px; border-bottom: 1px solid var(--line); background: var(--pale); }
.law-viewer-header > div:first-child > span { color: var(--orange); font-size: 10px; letter-spacing: .13em; }
.law-viewer-header h2 { margin-top: 6px; color: var(--forest); font-size: 24px; line-height: 1.35; letter-spacing: -.03em; word-break: keep-all; }
.law-viewer-header p { margin-top: 8px; color: var(--muted); font-size: 11px; }
.law-viewer-actions { flex: none; display: flex; gap: 8px; }
.law-viewer-actions a, .law-viewer-actions button { padding: 8px 12px; border: 1px solid var(--line); background: var(--white); color: var(--green); font-size: 11px; cursor: pointer; }
.law-viewer-actions a:hover, .law-viewer-actions a:focus-visible, .law-viewer-actions button:hover, .law-viewer-actions button:focus-visible { border-color: var(--forest); color: var(--forest); outline: none; }
.law-article-search { display: grid; grid-template-columns: 160px minmax(0, 1fr); align-items: center; gap: 16px; padding: 17px 28px; border-bottom: 1px solid var(--line); }
.law-article-search label { color: var(--green); font-size: 12px; font-weight: 600; }
.law-article-search input { min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 12px; outline: none; }
.law-article-search input:focus-visible { border-color: var(--forest); box-shadow: 0 0 0 2px rgba(18, 77, 57, .12); }
.law-viewer-status { padding: 13px 28px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.law-articles { max-height: 70vh; overflow-y: auto; padding: 0 28px 28px; scrollbar-color: var(--green) var(--pale); }
.law-article { padding: 24px 0; border-bottom: 1px solid var(--line); }
.law-article[hidden] { display: none; }
.law-article h3 { color: var(--forest); font-size: 15px; line-height: 1.8; letter-spacing: -.015em; word-break: keep-all; }
.law-article-reference { display: block; margin-top: 7px; color: var(--orange); font-size: 10px; }
.law-paragraph { margin-top: 13px; color: var(--ink); font-size: 13px; line-height: 1.85; word-break: keep-all; }
.law-subitems { margin: 9px 0 0; padding-left: 22px; list-style: none; color: var(--muted); }
.law-subitems .law-subitems { margin: 5px 0 5px 16px; }
.law-subitems li + li { margin-top: 6px; }
.law-card[hidden], .law-empty[hidden] { display: none; }
.law-card > a { min-height: 128px; display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.law-card-code { align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding-right: 20px; border-right: 1px solid var(--line); }
.law-card-code span { color: var(--orange); font-size: 12px; font-weight: 600; letter-spacing: .04em; overflow-wrap: anywhere; }
.law-card-code small { color: var(--muted); font-size: 10px; }
.law-card-body > p { margin-bottom: 5px; color: var(--green); font-size: 11px; }
.law-card-body h3 { color: var(--forest); font-size: 17px; line-height: 1.45; letter-spacing: -.02em; word-break: keep-all; }
.law-card-body > span { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.65; word-break: keep-all; }
.law-card > a > strong { color: var(--green); font-size: 12px; white-space: nowrap; }
.law-card > a:hover h3, .law-card > a:focus-visible h3 { text-decoration: underline; text-underline-offset: 5px; }
.law-card > a:focus-visible { outline: 2px solid var(--forest); outline-offset: 4px; }
.law-empty { min-height: 220px; display: flex; flex-direction: column; justify-content: center; gap: 6px; border-bottom: 1px solid var(--line); }
.law-empty p { color: var(--forest); font-size: 17px; font-weight: 600; }
.law-empty span { color: var(--muted); font-size: 12px; }
.law-notice { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 24px; margin-top: 38px; padding: 20px 22px; border-left: 3px solid var(--green); background: var(--pale); }
.law-notice strong { color: var(--forest); font-size: 12px; }
.law-notice p { color: var(--muted); font-size: 12px; line-height: 1.7; word-break: keep-all; }

.article-header { min-height: 74px; }
.back-link { color: var(--forest); font-size: 13px; }
.article-shell {
  width: min(1180px, calc(100% - 48px));
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 7%;
  margin: 0 auto;
  padding: 52px 0 90px;
}
.article-rail { align-self: start; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--forest); }
.article-rail p { padding: 15px 0 8px; color: var(--green); font-size: 11px; letter-spacing: .1em; }
.article-rail span { padding: 9px 0; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 12px; overflow-wrap: anywhere; }
.article-rail a { margin-top: 18px; color: var(--forest); font-size: 12px; font-weight: 600; }
.prose { min-width: 0; max-width: 800px; }
.library-kicker { margin-bottom: 14px; color: var(--orange); font-size: 11px; letter-spacing: .1em; }
.prose > h1 { color: var(--forest); font-size: clamp(36px, 5vw, 54px); line-height: 1.17; letter-spacing: -.045em; word-break: keep-all; }
.article-summary { margin-top: 24px; color: var(--muted); font-size: 18px; line-height: 1.75; word-break: keep-all; }
.article-meta { display: flex; flex-wrap: wrap; gap: 18px; margin: 30px 0 48px; padding: 13px 0; border-block: 1px solid var(--line); color: var(--green); font-size: 12px; }
.article-content { font-size: 16px; line-height: 1.9; word-break: keep-all; }
.article-content h1:first-child { display: none; }
.article-content h2 { margin: 58px 0 17px; color: var(--forest); font-size: 27px; letter-spacing: -.03em; }
.article-content h3 { margin: 38px 0 13px; color: var(--forest); font-size: 21px; }
.article-content p { margin: 0 0 23px; }
.article-content a { color: var(--forest); text-decoration: underline; text-underline-offset: 4px; }
.article-content pre { overflow-x: auto; margin: 28px 0; padding: 22px; background: var(--forest); color: var(--white); }
.article-content blockquote { margin: 28px 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--forest); color: var(--muted); }
.article-content table { width: 100%; border-collapse: collapse; margin: 28px 0; }
.article-content th, .article-content td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }

.error-page { width: min(900px, calc(100% - 48px)); min-height: calc(100vh - 126px); display: flex; flex-direction: column; justify-content: center; margin: 0 auto; padding: 80px 0; }
.error-page h1 { color: var(--forest); font-size: clamp(38px, 6vw, 60px); line-height: 1.15; letter-spacing: -.045em; word-break: keep-all; }
.error-page > p:not(.library-kicker) { margin-top: 22px; color: var(--muted); }
.text-link { width: fit-content; margin-top: 28px; color: var(--forest); border-bottom: 1px solid var(--forest); font-weight: 600; }

footer { display: flex; justify-content: space-between; gap: 24px; padding: 22px max(5vw, calc((100vw - 1180px) / 2)); border-top: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 11px; }

@media (max-width: 760px) {
  .site-header { min-height: 64px; padding: 0 24px; }
  .wordmark strong { font-size: 16px; }
  nav { gap: 18px; font-size: 12px; }
  nav a, .back-link { padding: 22px 0 18px; }
  .library-home, .catalog-page, .laws-page { width: min(100% - 40px, 1180px); }
  .library-board, .catalog-layout, .about-catalog, .article-shell { grid-template-columns: 1fr; gap: 38px; padding: 38px 0 52px; }
  .library-sidebar, .catalog-sidebar { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .library-sidebar > p, .library-sidebar hr, .catalog-sidebar > p, .catalog-sidebar hr { grid-column: 1 / -1; }
  .about-catalog > aside { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 18px; }
  .about-catalog > aside p { grid-column: 1 / -1; }
  .home-section-intro, .page-section-intro { grid-template-columns: 1fr; gap: 10px; }
  .home-section-intro > p { justify-self: start; max-width: none; text-align: left; }
  .collection-grid { grid-template-columns: 1fr; }
  .collection-grid > a, .collection-grid > a + a { min-height: auto; padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .collection-grid > a:last-child { border-bottom: 0; }
  .collection-grid h3 { margin-top: 10px; }
  .collection-grid strong { padding-top: 10px; }
  .document-row { grid-template-columns: 82px minmax(0, 1fr); gap: 14px; }
  .document-row time, .document-row > strong { grid-column: 2; }
  .article-rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
  .article-rail p, .article-rail a { grid-column: 1 / -1; }
  .laws-page { padding: 42px 0 60px; }
  .law-search-heading { grid-template-columns: 1fr; gap: 8px; }
  .law-live-open { grid-template-columns: 86px minmax(0, 1fr) auto; gap: 18px; }
  .law-viewer-header { padding: 22px; }
  .law-article-search { padding-inline: 22px; }
  .law-viewer-status { padding-inline: 22px; }
  .law-articles { padding: 0 22px 24px; }
  .law-card > a { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 18px; }
  .law-card-code { padding-right: 14px; }
  footer { padding: 22px 24px; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .site-header { align-items: flex-start; flex-direction: column; gap: 2px; padding: 14px 20px 0; }
  nav { width: 100%; justify-content: space-between; gap: 10px; }
  nav a, .back-link { padding: 10px 0 12px; }
  .library-home, .catalog-page, .article-shell, .laws-page { width: calc(100% - 32px); }
  .library-sidebar, .catalog-sidebar { grid-template-columns: 1fr; }
  .library-sidebar > p, .library-sidebar hr, .catalog-sidebar > p, .catalog-sidebar hr { grid-column: 1; }
  .library-sidebar hr, .catalog-sidebar hr { margin: 20px 0; }
  .about-catalog > aside { grid-template-columns: 1fr 1fr; }
  .certification-groups { grid-template-columns: 1fr; }
  .certification-groups > section { min-height: auto; padding: 18px 0; }
  .certification-groups > section + section { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .start-list > a { grid-template-columns: 34px minmax(0, 1fr) 18px; gap: 9px; }
  .start-list small { font-size: 11px; }
  .library-section-heading { align-items: flex-start; }
  .document-row { grid-template-columns: 1fr auto; min-height: 0; padding: 21px 0; }
  .document-row > span { grid-column: 1 / -1; }
  .document-row > div { grid-column: 1; }
  .document-row time, .document-row > strong { grid-column: 2; align-self: end; }
  .profile-overview dl > div { grid-template-columns: 1fr; gap: 4px; }
  .article-rail { grid-template-columns: 1fr; }
  .article-rail p, .article-rail a { grid-column: 1; }
  .prose > h1 { font-size: 35px; }
  .article-summary { font-size: 17px; }
  .article-content { font-size: 15px; }
  .laws-hero h1 { font-size: 36px; }
  .laws-hero > p:last-child { font-size: 14px; }
  .law-search-panel { margin-top: 34px; padding: 22px 18px; }
  .law-search-control { grid-template-columns: 1fr; }
  .law-search-control input { height: 54px; }
  .law-search-control button { min-width: 0; height: 48px; }
  .law-search-meta, .law-results-heading, .law-viewer-header { align-items: flex-start; flex-direction: column; }
  .law-search-meta { gap: 7px; }
  .law-results-heading > p { text-align: left; }
  .law-live-open { grid-template-columns: 62px minmax(0, 1fr); gap: 13px; padding: 18px 0; }
  .law-live-type { grid-row: 1 / 3; padding-right: 10px; }
  .law-live-open > strong { grid-column: 2; }
  .law-viewer-actions { width: 100%; }
  .law-viewer-actions a, .law-viewer-actions button { flex: 1; text-align: center; }
  .law-article-search { grid-template-columns: 1fr; gap: 7px; }
  .law-articles { max-height: 64vh; }
  .law-card > a { grid-template-columns: 60px minmax(0, 1fr); gap: 14px; padding: 20px 0; }
  .law-card-code { grid-row: 1 / 3; }
  .law-card > a > strong { grid-column: 2; }
  .law-notice { grid-template-columns: 1fr; gap: 5px; }
  footer { flex-direction: column; gap: 4px; padding: 20px; }
}

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