:root {
  color-scheme: light;
  font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #20251f;
  background: #f8f7f3;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --green: #326b4b;
  --muted: #777c73;
  --line: #e6e5de;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

a { color: var(--green); }

.page-shell { width: min(100% - 40px, 860px); margin: 0 auto; padding: 28px 0 56px; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-size: 15px; font-weight: 800; text-decoration: none; }

.brand-mark { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 11px; background: var(--green); color: #fff; }

.home-link { font-size: 12px; font-weight: 700; text-decoration: none; }

.site-nav { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 19px 0 34px; padding: 0 0 15px; border-bottom: 1px solid var(--line); }

.site-nav a, .site-footer a { color: #70776d; font-size: 11px; text-decoration: none; }

.site-nav a:hover, .site-footer a:hover { color: var(--green); text-decoration: underline; }

.content-card { padding: clamp(22px, 5vw, 42px); border: 1px solid #eeede7; border-radius: 20px; background: #fff; box-shadow: 0 12px 38px rgb(41 48 37 / 4%); }

.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .08em; }

h1 { margin: 0 0 13px; font-size: clamp(27px, 5vw, 38px); letter-spacing: -.06em; line-height: 1.25; }

.intro { margin: 0 0 30px; color: var(--muted); font-size: 14px; line-height: 1.8; }

.content-card h2 { margin: 30px 0 10px; font-size: 18px; letter-spacing: -.04em; }

.content-card h3 { margin: 20px 0 7px; font-size: 14px; }

.content-card p, .content-card li { color: #555d53; font-size: 13px; line-height: 1.9; }

.content-card ul, .content-card ol { padding-left: 22px; }

.math-note { margin: 15px 0; padding: 16px 18px; border-left: 3px solid var(--green); border-radius: 0 10px 10px 0; background: #f2f6f1; color: #354638; font-size: 13px; line-height: 1.8; }

.notice { margin: 20px 0; padding: 14px 16px; border: 1px solid #ead9a9; border-radius: 10px; background: #fff9e9; color: #66572e; font-size: 12px; line-height: 1.8; }

.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

.updated { margin-top: 28px; color: #92978e !important; font-size: 11px !important; }

html[data-theme="dark"] {
  color-scheme: dark;
  color: #e8ece7;
  background: #151a16;
  --green: #82bd91;
  --muted: #a0a99f;
  --line: #343d35;
}

html[data-theme="dark"] .content-card { border-color: #343d35; background: #202721; }
html[data-theme="dark"] .content-card p, html[data-theme="dark"] .content-card li { color: #c1c9bf; }
html[data-theme="dark"] .site-nav a, html[data-theme="dark"] .site-footer a { color: #a5afa5; }
html[data-theme="dark"] .math-note { background: #29372c; color: #c1e0c3; }
html[data-theme="dark"] .notice { border-color: #625737; background: #332e20; color: #e5d7a8; }
html[data-theme="dark"] .updated { color: #929b92 !important; }

@media (max-width: 600px) {
  .page-shell { width: min(100% - 28px, 500px); padding-top: 20px; }
  .site-nav { gap: 9px 14px; margin-bottom: 24px; }
  .site-nav a { font-size: 10px; }
  .content-card { border-radius: 16px; }
}
