:root{
  --fx-bg:#FAF7F0;
  --fx-surface:#FFFFFF;
  --fx-text:#111827;
  --fx-muted:#6B7280;
  --fx-accent:#2563EB;
  --fx-border:#E5E7EB;
  --fx-radius:14px;
  --fx-shadow: 0 10px 30px rgba(17,24,39,.08);
}

body{
  background: var(--fx-bg) !important;
  color: var(--fx-text) !important;
  font-family: "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif !important;
  font-size: 18px;
  line-height: 1.7;
}
@media (max-width: 768px){
  body{ font-size: 16.5px; }
}

a{ color: var(--fx-accent); }
a:hover{ color: #1D4ED8; }

h1,h2,h3{
  color: var(--fx-text);
  font-family: "Noto Serif KR", "Noto Sans KR", serif;
  letter-spacing: -0.01em;
}

/* Astra separate container surfaces */
.ast-separate-container{
  background: var(--fx-bg) !important;
}
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single:not(.ast-related-post),
.ast-separate-container .ast-archive-description,
.ast-separate-container .ast-author-box,
.ast-separate-container .error-404,
.ast-separate-container .no-results{
  background: var(--fx-surface) !important;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius);
  box-shadow: var(--fx-shadow);
}

/* Front page: hide the default page title so the custom hero owns H1. */
body.home.page .entry-header{ display:none; }

/* Pages: avoid duplicate H1 when the page content starts with a manual <h1>. */
body.page .entry-header + .entry-content > h1:first-child{ display:none; }

/* Anchor targets should not hide under the header */
#summary,#key-question,#mini-toc,#references,#update-log,#related-posts{
  scroll-margin-top: 90px;
}

/* World-class single post scan blocks */
#summary + ul,
#key-question + ul,
#mini-toc + ul{
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: 12px;
  padding: 18px 22px 14px 44px;
  box-shadow: 0 10px 28px rgba(17,24,39,.06);
}
#mini-toc + ul{
  padding-left: 22px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
@media (max-width: 600px){
  #mini-toc + ul{ grid-template-columns: 1fr; }
}
#mini-toc + ul li{ margin: 0; }
#mini-toc + ul a{
  display:block;
  padding: 10px 12px;
  border: 1px solid var(--fx-border);
  border-radius: 10px;
  background: #fff;
}
#mini-toc + ul a:hover{
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 10px 24px rgba(37,99,235,.08);
  transform: translateY(-1px);
}

/* TOC container styling */
#ez-toc-container{
  border: 1px solid var(--fx-border) !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,.72) !important;
  backdrop-filter: blur(6px);
}

/* Footer baseline (we replace the credit content with a richer block) */
.ast-footer-copyright .fx-footer{
  display:flex;
  flex-wrap:wrap;
  gap: 10px 16px;
  align-items:center;
  justify-content:space-between;
}
.fx-footer__links{
  display:flex;
  flex-wrap:wrap;
  gap: 10px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fx-footer__links a{
  color: var(--fx-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.fx-footer__links a:hover{
  color: var(--fx-text);
  border-bottom-color: var(--fx-border);
}
.fx-footer__meta{
  color: var(--fx-muted);
  font-size: .95em;
}

/* Home IA layout */
.fx-home{
  display:flex;
  flex-direction:column;
  gap: 42px;
}
.fx-hero{
  padding: 26px 28px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius);
  background: rgba(255,255,255,.8);
  box-shadow: var(--fx-shadow);
}
.fx-archive-header{
  padding: 22px 24px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius);
  background: rgba(255,255,255,.8);
  box-shadow: var(--fx-shadow);
  margin-bottom: 18px;
}
.fx-archive-title{
  margin: 0;
  font-size: 2em;
  line-height: 1.15;
}
.fx-archive-subtitle{
  margin: 8px 0 0;
  color: var(--fx-muted);
  max-width: 68ch;
}
.fx-policy{
  max-width: 74ch;
}
.fx-policy__updated{
  margin-top: 0;
  color: var(--fx-muted);
  font-size: .95em;
}
.fx-policy__callout{
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid var(--fx-border);
  border-radius: 12px;
  background: rgba(250,247,240,.55);
}
.fx-hero__kicker{
  color: var(--fx-muted);
  font-weight: 600;
  letter-spacing: .02em;
}
.fx-hero__title{
  margin: 10px 0 6px;
  font-size: 2.2em;
  line-height: 1.15;
}
.fx-hero__subtitle{
  margin: 0;
  color: var(--fx-muted);
  max-width: 58ch;
}
.fx-hero__cta{
  margin-top: 16px;
  display:flex;
  flex-wrap:wrap;
  gap: 10px 12px;
}
.fx-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--fx-border);
  background: #fff;
  color: var(--fx-text);
  text-decoration:none;
  font-weight: 600;
}
.fx-btn--primary{
  background: var(--fx-accent);
  border-color: var(--fx-accent);
  color: #fff;
}
.fx-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(17,24,39,.08);
}
.fx-section__head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.fx-section__title{
  margin: 0;
  font-size: 1.4em;
}
.fx-section__more{
  color: var(--fx-muted);
  text-decoration:none;
}
.fx-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1000px){
  .fx-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px){
  .fx-grid{ grid-template-columns: 1fr; }
}
.fx-card{
  border: 1px solid var(--fx-border);
  border-radius: 14px;
  background: #fff;
  overflow:hidden;
  box-shadow: 0 10px 26px rgba(17,24,39,.06);
  height: 100%;
  display:flex;
  flex-direction:column;
}
.fx-card__thumb img{
  width: 100%;
  height: auto;
  display:block;
}
.fx-card__body{
  padding: 14px 14px 16px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.fx-card__meta{
  display:flex;
  flex-wrap:wrap;
  gap: 8px 10px;
  align-items:center;
  color: var(--fx-muted);
  font-size: .92em;
}
.fx-pill{
  display:inline-flex;
  align-items:center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--fx-border);
  color: var(--fx-muted);
  text-decoration:none;
  background: rgba(250,247,240,.6);
}
.fx-card__title{
  margin: 0;
  font-size: 1.12em;
  line-height: 1.25;
}
.fx-card__title a{
  color: var(--fx-text);
  text-decoration:none;
}
.fx-card__excerpt{
  margin: 0;
  color: var(--fx-muted);
}
