/* 다원케어 화면 스타일
   이름 규칙: l-(배치) / u-(한 가지 일) / 그 밖은 부품 이름(부품__부분, 부품--변형) */
:root {
  --forest: #1F6B4F;
  --forest-deep: #164F3A;
  --navy: #1E3A5F;
  --ink: #1B2733;
  --muted: #4A5866;
  --paper: #FBF8F2;
  --card: #FFFFFF;
  --line: #D9D2C3;
  --apricot: #E8833A;
  --apricot-soft: #FCEBDD;
  --mint: #E6F2EC;
  --focus: #C25A12;
  --radius: 14px;
  --tap: max(48px, 2.6rem);
}
html { font-size: 19px; -webkit-text-size-adjust: 100%; }
html[data-textsize="2"] { font-size: 22px; }
html[data-textsize="3"] { font-size: 26px; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { color: var(--forest); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.35; color: var(--navy); }
.u-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.l-wrap { width: min(100% - 2rem, 1120px); margin-inline: auto; }
.l-narrow { width: min(100% - 2rem, 780px); }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 10; border-radius: 8px; }
.skip:focus { top: 1rem; color: #fff; }

/* 머리 */
.masthead { background: var(--card); border-bottom: 1px solid var(--line); }
.masthead__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .6rem 0; }
.brand { display: inline-flex; align-items: center; min-height: var(--tap); }
.brand__img { height: 64px; width: auto; }
.brand__img--dark { display: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.toolbar__set { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.toolbar__label { font-size: .85rem; font-weight: 600; color: var(--muted); padding-inline: .5rem .1rem; }
.tbtn {
  min-height: var(--tap); min-width: var(--tap); padding: .2rem .9rem; border-radius: 999px;
  border: 2px solid var(--forest); background: #fff; color: var(--forest-deep); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.toolbar__set .tbtn { border-color: transparent; background: transparent; }
.tbtn[aria-pressed="true"] { background: var(--forest); color: #fff; border-color: var(--forest); }
.tbtn:hover { border-color: var(--forest-deep); }
.topicnav { background: var(--forest); }
.topicnav__list { list-style: none; margin: 0 auto; padding: .35rem 0; display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: thin; }
.topicnav a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 .9rem; white-space: nowrap;
  color: #fff; text-decoration: none; font-weight: 600; border-radius: 10px;
}
.topicnav a:hover, .topicnav a[aria-current="page"] { background: var(--forest-deep); color: #fff; text-decoration: underline; }
.topicnav a:focus-visible { outline-color: #FFD27A; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .2rem .5rem; padding: 0; margin: 1rem auto .5rem; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: .5rem; color: var(--muted); }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--tap); padding: .4rem 1.3rem;
  border-radius: 12px; font-weight: 800; text-decoration: none; border: 2px solid transparent; font-size: 1rem; cursor: pointer; font-family: inherit;
}
.btn--main { background: var(--forest); color: #fff; }
.btn--main:hover { background: var(--forest-deep); color: #fff; }
.btn--line { background: #fff; color: var(--forest-deep); border-color: var(--forest); }
.btn--call { background: var(--apricot); color: #23180F; }
.btn--call:hover { background: #D46F27; color: #23180F; }
.pill { display: inline-block; padding: .05rem .7rem; border-radius: 999px; background: var(--apricot-soft); color: #7A3A0C; font-weight: 800; }

/* 처음 화면 */
.hero { background: linear-gradient(180deg, var(--mint), var(--paper)); padding: 1.6rem 0 2rem; }
.hero__grid { display: grid; gap: 1.4rem; align-items: center; }
.hero__title { font-size: 1.75rem; margin: 0 0 .8rem; font-weight: 800; }
.hero__lead { font-size: 1.05rem; color: var(--ink); margin: 0 0 1.2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.hero__img { border-radius: 20px; }
.sechead { font-size: 1.35rem; margin: 2.2rem 0 1rem; padding-left: .7rem; border-left: 6px solid var(--apricot); }
.pagehead { font-size: 1.7rem; margin: .6rem 0 .4rem; }
.lead { color: var(--muted); font-size: 1.02rem; }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: .7rem; }
.tile {
  display: flex; flex-direction: column; gap: .2rem; min-height: 5.2rem; padding: 1rem 1.1rem; background: var(--card);
  border: 2px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink);
}
.tile:hover { border-color: var(--forest); }
.tile__name { font-weight: 800; font-size: 1.12rem; color: var(--forest-deep); }
.tile__desc { font-size: .9rem; color: var(--muted); }
.cards { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: 1fr; gap: 1rem; }
.card__link {
  display: flex; flex-direction: column; gap: .35rem; height: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); padding-bottom: 1rem;
}
.card__link:hover { border-color: var(--forest); box-shadow: 0 4px 14px rgba(30, 58, 95, .08); }
.card__img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card__kind, .card__title, .card__sum, .card__meta { padding-inline: 1rem; }
.card__kind { margin-top: .7rem; font-size: .82rem; font-weight: 800; color: var(--apricot); color: #A04A0F; }
.card__title { font-size: 1.15rem; font-weight: 800; color: var(--navy); line-height: 1.4; }
.card__sum { font-size: .93rem; color: var(--muted); }
.card__meta { font-size: .8rem; color: var(--muted); margin-top: auto; }
.empty { padding: 1.2rem; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.helpband { margin-top: 2.4rem; margin-bottom: 2.4rem; padding: 1.4rem; background: var(--navy); color: #fff; border-radius: 20px; }
.helpband h2 { color: #fff; margin-top: 0; }
.helpband a:not(.btn) { color: #FFE2C7; }

/* 글 */
.post { padding: .4rem 0 2.4rem; }
.post__kind { margin: .4rem 0; font-weight: 800; font-size: .9rem; }
.post__kind a { color: #A04A0F; }
.post__title { font-size: 1.75rem; margin: .2rem 0 .6rem; font-weight: 800; }
.post__meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .88rem; color: var(--muted); margin: 0 0 1rem; }
.post__fig { margin: 0 0 1.2rem; }
.post__fig img { border-radius: 18px; }
.post h2 { font-size: 1.35rem; margin: 2rem 0 .7rem; }
.post h3 { font-size: 1.12rem; margin: 1.3rem 0 .4rem; }
.post p, .post li { font-size: 1rem; }
.post ul, .post ol { padding-left: 1.3rem; }
.post li { margin: .3rem 0; }
.summary { background: var(--mint); border: 2px solid #B9D9C8; border-radius: 18px; padding: .4rem 1.2rem 1rem; }
.summary h2 { margin-top: .8rem; color: var(--forest-deep); }
.summary__list { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.summary__list li { position: relative; padding-left: 2.2rem; margin: .55rem 0; font-weight: 600; }
.summary__list li::before {
  counter-increment: s; content: counter(s); position: absolute; left: 0; top: .1rem; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--forest); color: #fff; font-size: .85rem; display: grid; place-items: center; font-weight: 800;
}
.steps { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: .8rem; }
.step { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0 !important; }
.step__num { width: 2.4rem; height: 2.4rem; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 800; font-size: 1.2rem; display: grid; place-items: center; }
.step__body strong { display: block; font-size: 1.08rem; color: var(--navy); }
.phones { list-style: none; padding: 0 !important; display: grid; gap: .7rem; }
.phone { display: grid; gap: .2rem; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin: 0 !important; }
.phone__name { font-weight: 800; color: var(--navy); }
.phone__num {
  display: inline-flex; align-items: center; justify-self: start; min-height: var(--tap); padding: .1rem 1rem; border-radius: 12px;
  background: var(--apricot); color: #23180F; font-size: 1.45rem; font-weight: 800; text-decoration: none; letter-spacing: .02em;
}
.phone__num::before { content: "☎"; margin-right: .5rem; font-size: 1.1rem; }
.phone__num:hover { background: #D46F27; color: #23180F; }
.phone__note { font-size: .9rem; color: var(--muted); }
.faq__item { border-top: 1px solid var(--line); padding: .3rem 0 .6rem; }
.faq__q { color: var(--navy); }
.faq__q::before { content: "물음 "; color: #A04A0F; font-weight: 800; }
.sources { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .3rem 1.2rem 1rem; margin-top: 2rem; }
.sources__date { font-size: .92rem; color: var(--muted); }
.note-box { background: var(--apricot-soft); border-left: 6px solid var(--apricot); border-radius: 10px; padding: .2rem 1rem; margin: 1rem 0; }
.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; min-width: 420px; background: var(--card); font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: .55rem .7rem; text-align: left; vertical-align: top; }
thead th { background: var(--navy); color: #fff; }
tbody th { background: #F3EFE6; font-weight: 600; }
.termlink { text-decoration-style: dotted; text-decoration-thickness: .1em; }
.callout { margin: 2.2rem 0 1rem; padding: 1.1rem 1.2rem; border-radius: 18px; background: var(--navy); color: #fff; }
.callout p { margin: .3rem 0; display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
.callout__small { font-size: .88rem; color: #DCE6F2; display: block !important; }
.related { margin-top: 2rem; }
.related__list { padding-left: 1.2rem; }

/* 도구 */
.qform { display: grid; gap: 1.2rem; }
.qset { border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); padding: .6rem 1rem 1rem; margin: 0; }
.qset legend { font-weight: 800; color: var(--navy); font-size: 1.08rem; padding: 0 .4rem; }
.qset__hint { margin: .2rem 0 .6rem; color: var(--muted); font-size: .9rem; }
.choices { display: grid; gap: .5rem; grid-template-columns: 1fr; }
.choice { display: flex; align-items: center; gap: .7rem; min-height: var(--tap); padding: .4rem .9rem; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--forest); background: var(--mint); font-weight: 600; }
.choice input { width: 1.4rem; height: 1.4rem; accent-color: var(--forest); flex: none; }
.field { display: grid; gap: .3rem; }
.field label { font-weight: 600; }
.field input, .field select {
  font: inherit; min-height: var(--tap); padding: .3rem .8rem; border: 2px solid #9AA6B2; border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
.field small { color: var(--muted); font-size: .85rem; }
.result { margin-top: 1.4rem; display: grid; gap: .9rem; }
.result:empty { display: none; }
.hit { background: var(--card); border: 2px solid var(--line); border-left: 8px solid var(--forest); border-radius: var(--radius); padding: .8rem 1rem; }
.hit--maybe { border-left-color: var(--apricot); }
.hit h3 { margin: .2rem 0 .3rem; }
.hit__tag { display: inline-block; font-size: .8rem; font-weight: 800; padding: 0 .6rem; border-radius: 999px; background: var(--mint); color: var(--forest-deep); }
.hit--maybe .hit__tag { background: var(--apricot-soft); color: #7A3A0C; }
.verdict { padding: 1rem 1.2rem; border-radius: 18px; font-size: 1.08rem; }
.verdict--yes { background: var(--mint); border: 2px solid var(--forest); }
.verdict--no { background: var(--apricot-soft); border: 2px solid var(--apricot); }

/* 발 */
.sitefoot { background: #14283F; color: #E9EEF4; padding: 2rem 0 1rem; margin-top: 2rem; }
.sitefoot a { color: #FFE2C7; }
.sitefoot__grid { display: grid; gap: 1.2rem; }
.sitefoot__name { font-weight: 800; font-size: 1.2rem; margin: 0; }
.sitefoot__links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.sitefoot__links a { display: inline-flex; min-height: var(--tap); align-items: center; }
.sitefoot__help .telink { font-weight: 800; font-size: 1.2rem; }
.sitefoot__copy { font-size: .85rem; color: #B9C6D4; border-top: 1px solid #2C4560; padding-top: .8rem; margin-top: 1rem; }

@media (min-width: 720px) {
  .hero__grid { grid-template-columns: 1.1fr 1fr; }
  .hero__title { font-size: 2.1rem; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .choices { grid-template-columns: repeat(2, 1fr); }
  .sitefoot__grid { grid-template-columns: 2fr 1fr; }
}
@media (min-width: 1024px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cards--wide { grid-template-columns: repeat(2, 1fr); }
  .topicnav__list { flex-wrap: wrap; overflow: visible; }
}
@media (max-width: 560px) {
  .brand__img { height: 46px; }
  .toolbar { width: 100%; }
  .toolbar__label { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* 진하게 보기(고대비) */
html[data-contrast="on"] {
  --paper: #000; --card: #000; --ink: #fff; --muted: #F0F0F0; --line: #fff; --navy: #fff; --forest: #FFE14D; --forest-deep: #FFE14D;
  --mint: #000; --apricot: #FFE14D; --apricot-soft: #000; --focus: #FFE14D;
}
html[data-contrast="on"] body { background: #000; color: #fff; }
html[data-contrast="on"] a { color: #FFE14D; }
html[data-contrast="on"] .brand__img--light { display: none; }
html[data-contrast="on"] .brand__img--dark { display: block; }
html[data-contrast="on"] .masthead, html[data-contrast="on"] .topicnav, html[data-contrast="on"] .sitefoot, html[data-contrast="on"] .callout, html[data-contrast="on"] .helpband { background: #000; border-color: #fff; }
html[data-contrast="on"] .topicnav { border-bottom: 2px solid #fff; }
html[data-contrast="on"] .topicnav a, html[data-contrast="on"] .helpband, html[data-contrast="on"] .callout { color: #fff; }
html[data-contrast="on"] .tbtn, html[data-contrast="on"] .choice, html[data-contrast="on"] .field input, html[data-contrast="on"] .field select { background: #000; color: #fff; border-color: #fff; }
html[data-contrast="on"] .tbtn[aria-pressed="true"], html[data-contrast="on"] .btn--main, html[data-contrast="on"] .btn--call, html[data-contrast="on"] .phone__num,
html[data-contrast="on"] .step__num, html[data-contrast="on"] .summary__list li::before, html[data-contrast="on"] thead th { background: #FFE14D; color: #000; }
html[data-contrast="on"] .btn--line { background: #000; color: #FFE14D; border-color: #FFE14D; }
html[data-contrast="on"] .hero { background: #000; }
html[data-contrast="on"] tbody th { background: #000; }
html[data-contrast="on"] .card__kind, html[data-contrast="on"] .post__kind a, html[data-contrast="on"] .faq__q::before { color: #FFE14D; }
html[data-contrast="on"] .card__img, html[data-contrast="on"] .post__fig img, html[data-contrast="on"] .hero__img { filter: contrast(1.1); }
html[data-contrast="on"] .pill { background: #FFE14D; color: #000; }

/* 도구줄은 글자 크기 설정과 상관없이 같은 크기 유지(버튼이 줄 밖으로 밀리지 않게) */
.toolbar .tbtn { font-size: 17px; white-space: nowrap; min-height: 48px; padding: 0 14px; }
.toolbar__label { font-size: 15px; }
@media (max-width: 560px) {
  .masthead__row { gap: 8px; }
  .toolbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .toolbar__set { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); }
  .toolbar > .tbtn { padding: 0 6px; }
}
