/*
Theme Name: 코스컴AX NEWS
Description: 피부과·치과 운영 전문 뉴스룸 테마.
Version: 1.0.5
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: kscax-news
*/

:root {
	--ink: #142422;
	--muted: #4f6560;
	--paper: #fefefd;
	--quiet: #edf4f0;
	--line: #c9d8d2;
	--green: #004c40;
	--deep: #002e28;
	--body: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
	--headline: "Noto Serif KR", "Nanum Myeongjo", "Batang", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--body); line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid #a76019; outline-offset: 4px; }
img { display: block; width: 100%; height: auto; }
figure { margin: 0; }
figcaption { color: var(--muted); font-size: .82rem; padding-top: .55rem; }
button, input { font: inherit; }
.shell { width: min(100% - 3.5rem, 1160px); margin-inline: auto; }
.screen-reader-text, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link:focus { position: fixed; inset: 1rem auto auto 1rem; z-index: 100000; padding: .65rem 1rem; background: white; color: var(--green); }

.edition { background: var(--deep); color: white; }
.edition-inner { min-height: 33px; display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-size: .82rem; letter-spacing: .02em; }
.edition time { color: #d3e3de; white-space: nowrap; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 1.65rem; }
.wordmark { display: inline-flex; align-items: center; min-width: 0; gap: clamp(.45rem, 1vw, .85rem); font-size: clamp(1.55rem, 4.4vw, 3.15rem); font-weight: 900; line-height: 1; text-decoration: none; white-space: nowrap; }
.wordmark-logo { width: clamp(8.75rem, 48vw, 16.5rem); min-width: 0; height: auto; }
.wordmark strong { color: var(--green); font-family: system-ui, sans-serif; font-weight: 850; letter-spacing: -.09em; }
.news-search { display: flex; border-bottom: 1px solid var(--ink); width: min(230px, 100%); }
.news-search input { min-width: 0; width: 100%; padding: .42rem 0; border: 0; background: transparent; color: var(--ink); }
.news-search button { flex: 0 0 auto; white-space: nowrap; border: 0; background: none; padding: .42rem .05rem .42rem .6rem; cursor: pointer; font-weight: 750; color: var(--green); }
.nav-band { border-block: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1.3rem; }
.sections { display: flex; flex-wrap: wrap; gap: 0 1.55rem; align-items: center; }
.sections a { display: inline-block; padding: .82rem 0 .65rem; border-bottom: 3px solid transparent; text-decoration: none; font-size: .95rem; font-weight: 750; white-space: nowrap; }
.sections a:hover, .sections a[aria-current] { color: var(--green); border-color: var(--green); }
.diagnosis { background: var(--quiet); color: var(--green); padding: .52rem .85rem; font-size: .9rem; white-space: nowrap; font-weight: 750; text-decoration: none; }
.diagnosis:hover { background: var(--deep); color: white; }

.front-page, .listing { padding-block: 2.75rem 4rem; }
.front-page { padding-top: 1.6rem; }
.front-grid { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: clamp(1.35rem, 3vw, 2.45rem); align-items: start; }
.front-grid:not(:has(.featured-stories)) { grid-template-columns: minmax(0, 1fr); max-width: 790px; }
.desk-label { margin: 0 0 .6rem; color: var(--green); font-size: .86rem; font-weight: 850; }
.lead h2 { margin: 0; font: 800 clamp(1.65rem, 3.4vw, 2.85rem)/1.2 var(--headline); letter-spacing: -.055em; }
.lead h2 a, .story-card h3 a { text-decoration: none; }
.lead h2 a:hover, .story-card h3 a:hover { text-decoration: underline; }
.lead-deck { color: var(--muted); font-size: 1.06rem; margin-block: .65rem .6rem; }
.lead-deck p { margin: 0; }
.lead-image { display: block; margin-bottom: .95rem; background: var(--quiet); }
.lead-image img, .cover-photo img { aspect-ratio: 16 / 9; object-fit: cover; }
.featured-story-grid { display: grid; gap: .95rem; }
.featured-stories .story-card { padding-bottom: .8rem; }
.featured-stories .story-card:last-child { border-bottom: 0; }
.featured-stories .story-image { margin-bottom: .42rem; }
.featured-stories .story-card h3 { margin-block: .16rem .25rem; }
.news-brief { margin-top: 2.8rem; border-top: 3px solid var(--green); background: var(--quiet); padding: 1.35rem clamp(1rem, 2.6vw, 1.65rem) .4rem; }
.news-brief-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.news-brief h2 { margin: 0 0 .45rem; letter-spacing: -.055em; font-size: 1.25rem; }
.news-brief a { display: block; padding: .75rem 0; text-decoration: none; }
.news-brief a:hover strong { text-decoration: underline; }
.news-brief strong, .news-brief span { display: block; }
.news-brief span { color: var(--muted); font-size: .91rem; margin-top: .25rem; }
.latest { margin-top: 2.8rem; }
.front-page:not(:has(.front-grid)) .latest { margin-top: 0; }
.section-title { margin: 0 0 1.3rem; border-top: 3px solid var(--ink); padding-top: .65rem; line-height: 1.25; font-size: clamp(1.35rem, 3vw, 1.8rem); letter-spacing: -.055em; }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem 1.5rem; }
.story-card { border-bottom: 1px solid var(--line); padding-bottom: 1.05rem; }
.story-image { display: block; margin-bottom: .62rem; }
.story-image img { aspect-ratio: 16 / 9; object-fit: cover; }
.story-meta, .story-meta a { color: var(--green); font-size: .85rem; font-weight: 800; }
.story-meta a { text-decoration: none; }
.story-meta a:hover { text-decoration: underline; }
.story-card h3 { margin: .28rem 0 .36rem; font-size: 1.16rem; line-height: 1.42; letter-spacing: -.045em; }
.article-date, .empty-feed { color: var(--muted); }
.article-date { font-size: .84rem; }
.pagination { margin-top: 2rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: .3rem; }
.page-numbers { min-width: 2.4rem; padding: .35rem .55rem; text-align: center; border: 1px solid var(--line); text-decoration: none; }
.page-numbers.current { background: var(--green); color: white; }

.article-shell { padding-block: 3rem 4.2rem; }
.news-article { max-width: 790px; margin-inline: auto; }
.article-header { padding-bottom: 1.15rem; border-bottom: 1px solid var(--line); margin-bottom: 1.35rem; }
.article-header h1 { margin: .4rem 0 .7rem; font: 800 clamp(2.05rem, 5vw, 3.25rem)/1.23 var(--headline); letter-spacing: -.055em; }
.article-deck { color: var(--muted); font-size: 1.12rem; }
.article-deck p { margin: 0 0 .85rem; }
.article-byline { display: flex; gap: .25rem .85rem; flex-wrap: wrap; margin: 0; color: var(--muted); font-size: .88rem; }
.article-photo { margin-bottom: 1.35rem; }
.article-content { font-size: clamp(1.03rem, 2.1vw, 1.15rem); line-height: 1.83; }
.article-content h2, .article-content h3 { margin-block: 1.8em .38em; line-height: 1.35; letter-spacing: -.045em; }
.article-content p, .article-content ul, .article-content ol { margin-block: .75em; }
.article-content a { color: var(--green); }
.article-content table { width: 100%; border-collapse: collapse; font-size: .93em; }
.article-content th, .article-content td { padding: .55rem .65rem; border: 1px solid var(--line); text-align: left; }
.article-content th { background: var(--quiet); }
.article-content figure, .article-content .wp-block-table { margin-block: 1.2rem; }
.article-content .wp-block-table { overflow-x: auto; }
.article-related { display: flex; flex-wrap: wrap; gap: .65rem 1.25rem; padding: 1.2rem 0 0; margin-top: 2.5rem; border-top: 1px solid var(--line); color: var(--green); font-weight: 700; }
.site-footer { background: var(--deep); color: white; padding-block: 2rem; }
.footer-inner, .footer-inner nav { display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; align-items: start; justify-content: space-between; }
.footer-inner a { color: white; text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
.footer-brand { font-size: 1.25rem; font-weight: 850; }
.footer-inner p { margin: .3rem 0 0; color: #d3e3de; font-size: .9rem; }

@media (max-width: 840px) {
	.front-grid { grid-template-columns: minmax(0, 1fr); }
	.featured-story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.featured-stories .story-card:last-child { border-bottom: 1px solid var(--line); }
	.nav-inner { flex-wrap: wrap; }
	.diagnosis { margin-bottom: .55rem; }
	.story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
	.shell { width: calc(100% - 2rem); }
	.masthead-inner { align-items: stretch; flex-direction: column; gap: .8rem; padding-block: 1.05rem .8rem; }
	.news-search { width: 100%; }
	.sections { gap: 0 .85rem; }
	.sections a { padding: .58rem 0 .46rem; font-size: .88rem; }
	.front-page, .listing, .article-shell { padding-top: 1.5rem; }
	.story-grid { grid-template-columns: minmax(0, 1fr); }
	.featured-story-grid { gap: .75rem; }
	.featured-stories .story-card h3 { font-size: 1rem; }
	.news-brief-links { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.news-brief-links a + a { border-top: 1px solid var(--line); }
}
