/* Preserve KELI content while matching the main site's typography. */
:root { --reader-font: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
html { scroll-behavior: smooth; }
body {
  background: #fcfbf8 !important; color: #253142; padding: 0 20px 40px !important;
  font-family: var(--reader-font) !important; line-height: 1.85; -webkit-font-smoothing: antialiased;
}
a { color: #856326; text-underline-offset: 4px; overflow-wrap: anywhere; }
a:focus-visible { outline: 3px solid #a17c39; outline-offset: 5px; }
.logic-reader-header {
  max-width: 920px; margin: 0 auto 28px; display: flex; align-items: center;
  justify-content: space-between; gap: 18px; padding: 20px 0;
  border-bottom: 1px solid #ded5c2; font: 13px/1.7 var(--reader-font);
}
.logic-reader-header a { text-decoration: none; color: #253142; }
.logic-reader-brand { display: flex; gap: 10px; align-items: center; }
.logic-reader-brand img { width: 48px; height: 48px; }
.logic-reader-brand strong { font-size: 19px; white-space: nowrap; }
.logic-reader-brand small { display: block; font-size: 8px; letter-spacing: 1.3px; color: #856326; }
.logic-source {
  max-width: 880px; margin: 0 auto 28px; padding: 20px 24px;
  border-left: 3px solid #b69454; background: #f5f1e8;
  font: 14px/1.85 var(--reader-font); box-sizing: border-box;
}
.logic-source p { margin: 0; }
.logic-source small { display: block; margin-top: 10px; color: #666d74; font-size: 12px; }
.logic-source-actions { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; }
.logic-source-actions a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.paper {
  background: #fffefb !important; border: 1px solid #ded5c2 !important; box-shadow: none !important;
  border-radius: 7px; padding: 42px 46px !important; color: #253142;
}
.paper:after { display: none !important; }
#card-content { word-break: keep-all; overflow-wrap: break-word; }
/* Original cards include descendant and inline rules, so override the family throughout. */
#card-content, #card-content *, #card-content *::before, #card-content *::after { font-family: var(--reader-font) !important; }
#card-content img { max-width: 100%; height: auto; }
#card-content a { overflow-wrap: anywhere; }
#card-content .nameplate { border-color: #b69454 !important; gap: 16px; }
#card-content .nameplate .title { color: #253142 !important; font-size: 32px; font-weight: 700; letter-spacing: -.035em; line-height: 1.45; }
#card-content .nameplate .title .sub { font-size: 13px; font-weight: 400; letter-spacing: 0; line-height: 1.8; margin-top: 10px; }
#card-content .nameplate .meta { font-size: 12px; line-height: 1.8; }
#card-content .dateline { gap: 4px 20px; flex-wrap: wrap; font-size: 12px; line-height: 1.8; letter-spacing: 0; }
#card-content .eyebrow, #card-content .kicker, #card-content .concepts .label { letter-spacing: .04em; line-height: 1.8; }
#card-content .lead-headline { color: #253142 !important; font-size: 38px; font-weight: 700; line-height: 1.45 !important; letter-spacing: -.035em; }
#card-content .subhead { font-size: 19px; font-weight: 600; line-height: 1.75; letter-spacing: -.015em; }
#card-content .cols { font-size: 16px; font-weight: 400; line-height: 1.9; text-align: left; letter-spacing: -.01em; }
#card-content .cols p { text-indent: 0; margin-bottom: 16px; }
#card-content .cols p:first-of-type::first-letter { font: inherit; float: none; padding: 0; color: inherit; }
#card-content .sub-section-head, #card-content .concepts dt { font-weight: 700; line-height: 1.65; }
#card-content .boxed-quote { font-size: 17px; font-weight: 600; line-height: 1.8; }
#card-content .big-quote, #card-content .pull-bigquote { font-size: 22px; font-weight: 600; line-height: 1.75; letter-spacing: -.02em; }
#card-content .lead-img-caption, #card-content .fig-caption, #card-content .inline-cap,
#card-content figcaption, #card-content p[style*="font-style:italic"] { font-size: 12px !important; font-style: normal !important; line-height: 1.8; text-align: left; }
#card-content .colophon { line-height: 1.8; letter-spacing: 0; }
.logic-related, .logic-reader-footer { max-width: 880px; margin: 28px auto 0; padding: 24px 0; border-top: 1px solid #ded5c2; font: 13px/1.9 var(--reader-font); }
.logic-related h2 { font-size: 19px; margin: 0 0 12px; }
.logic-reader-footer p { color: #666d74; }
@media (max-width: 600px) {
  body { padding: 0 14px 28px !important; }
  .logic-reader-header { gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
  .logic-source { padding: 17px; font-size: 13px; }
  .paper { padding: 28px 20px !important; }
  #card-content .nameplate .title { font-size: 25px; }
  #card-content .nameplate .title .sub { font-size: 12px; }
  #card-content .nameplate .meta { text-align: left; }
  #card-content .dateline { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 0; }
  #card-content .eyebrow { font-size: 12px; }
  #card-content .lead-headline { font-size: 28px !important; letter-spacing: -.035em; }
  #card-content .subhead { font-size: 17px; }
  #card-content .cols { font-size: 16px; line-height: 1.85; }
  #card-content .big-quote, #card-content .pull-bigquote { font-size: 19px; }
  #card-content .big-quote { padding: 18px; }
  #card-content .big-quote > div { min-width: 0 !important; }
  #card-content p { overflow-wrap: break-word; }
  .logic-reader-footer { font-size: 12px; }
}
@media print {
  .logic-reader-header, .logic-source-actions, .logic-reader-footer, .logic-related { display: none; }
  body { background: white !important; padding: 0 !important; }
  .paper { border: 0 !important; padding: 0 !important; }
  .logic-source { background: white; margin-bottom: 12px; }
}
