/* WIP Labs — shared design system, copied verbatim from RENEWAL/a2 mockups.
   This is the single stylesheet for the rebuilt site; pages no longer load styles.css. */
body { margin:0; background:#f5f1e8; color:#2b2a26;
  font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  word-break: keep-all; overflow-wrap: break-word; }

/* ---- site nav (mockup's mock-bar, used as the real nav) ---- */
.mock-bar { max-width:720px; margin:0 auto; padding:12px 18px; border-bottom:1px solid #e3ddce;
  font-family: ui-monospace, monospace; font-size:12px; color:#6b6a63; display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.mock-bar a { position:relative; color:#9a6414; text-decoration:none; padding:3px 7px; border-radius:6px; }
.mock-bar a:not(:last-of-type)::after { content:"/"; position:absolute; top:50%; right:-9px; transform:translateY(-50%); color:#cec7b4; pointer-events:none; }
.mock-bar a:hover { background:#f3e7cf; }
.mock-bar a.on, .mock-bar a[aria-current="page"] { background:#f3e7cf; }
.mock-bar .lang-switch[aria-current="true"] { background:#f0ebdf; color:#2b2a26; }

footer.wl-footer { max-width:720px; margin:0 auto; padding:16px 18px 40px; display:flex; justify-content:space-between; gap:16px;
  font-size:11px; color:#9a988f; }
footer.wl-footer a { color:#9a988f; text-decoration:underline; }

/* =========================================================================
   WIP Labs — shared design system (redesign)
   One source of truth for tokens + common components across all pages.
   Scope: elements under a .wl root.
   ========================================================================= */
.wl {
  --wl-paper:       #f5f1e8;
  --wl-surface:     #fbf8f1;
  --wl-surface-alt: #f0ebdf;
  --wl-ink:         #2b2a26;
  --wl-ink-2:       #6b6a63;
  --wl-ink-3:       #9a988f;
  --wl-border:      #e3ddce;
  --wl-border-2:    #cec7b4;

  --wl-warn-ink: #9a6414;  --wl-warn-bg: #f3e7cf;  --wl-warn-br: #e7d5b0;
  --wl-good-ink: #2f7d5e;  --wl-good-bg: #dfeee6;
  --wl-bad-ink:  #b0492f;  --wl-bad-bg:  #f2e0d8;

  --wl-buy:  #2f8f6f;
  --wl-sell: #c65a3a;
  --wl-fear: #c65a3a;  --wl-greed: #2f8f6f;  --wl-neutral: #8f8d84;

  --wl-radius: 12px; --wl-radius-sm: 8px;
  --wl-mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  max-width: 720px; margin: 0 auto; padding: 24px 18px 56px;
  color: var(--wl-ink); -webkit-font-smoothing: antialiased;
}

.wl-head { margin-bottom: 26px; }
.wl-eyebrow { font-family: var(--wl-mono); font-size: 11px; letter-spacing: .14em; color: var(--wl-ink-3); margin: 0 0 8px; }
.wl-title { font-size: 26px; font-weight: 600; margin: 0 0 8px; line-height: 1.2; }
.wl-lede { font-size: 15px; color: var(--wl-ink-2); line-height: 1.6; margin: 0 0 10px; max-width: 52ch; }
.wl-basis { font-family: var(--wl-mono); font-size: 12px; color: var(--wl-ink-3); margin: 0; }

.wl-section { padding: 22px 0; border-top: 1px solid var(--wl-border); }
.wl-section:first-of-type { border-top: 0; padding-top: 6px; }
.wl-section:focus { outline: none; }
.wl-kicker { font-family: var(--wl-mono); font-size: 11px; letter-spacing: .1em; color: var(--wl-ink-3); margin: 0 0 12px; font-weight: 500; }
.wl-h2 { font-size: 17px; font-weight: 600; margin: 0; }
.wl-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.wl-source { font-size: 12px; color: var(--wl-ink-3); line-height: 1.55; margin: 14px 0 0; max-width: 58ch; }
.wl-note { font-size: 12px; color: var(--wl-ink-3); margin: 12px 0 0; line-height: 1.5; }

.wl-verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wl-panel {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--wl-surface); border: 1px solid var(--wl-border);
  border-radius: var(--wl-radius); padding: 14px;
  text-decoration: none; color: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.wl-panel:hover, .wl-panel:focus-visible { border-color: var(--wl-border-2); background: #fffdf7; outline: none; }
.wl-panel-label { font-size: 12px; color: var(--wl-ink-2); }
.wl-panel-state { font-size: 21px; font-weight: 600; line-height: 1.15; }
.wl-panel-basis { font-size: 12px; color: var(--wl-ink-2); line-height: 1.5; min-height: 2.2em; }
.wl-panel-axis { font-family: var(--wl-mono); font-size: 10px; letter-spacing: .04em; color: var(--wl-ink-3); margin-top: 2px; }
.wl-panel.is-warn { background: var(--wl-warn-bg); border-color: var(--wl-warn-br); }
.wl-panel.is-warn .wl-panel-label, .wl-panel.is-warn .wl-panel-state, .wl-panel.is-warn .wl-panel-basis { color: var(--wl-warn-ink); }
.wl-panel.is-warn .wl-panel-axis { color: #b48a4a; }

.wl-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.wl-metric { background: var(--wl-surface); border-radius: var(--wl-radius-sm); padding: 12px; }
.wl-metric-label { font-size: 12px; color: var(--wl-ink-2); display: block; margin-bottom: 4px; }
.wl-metric-value { font-size: 22px; font-weight: 600; }
.wl-metric-sub { font-size: 11px; color: var(--wl-ink-3); font-family: var(--wl-mono); }

.wl-dots { display: inline-flex; gap: 4px; }
.wl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wl-border-2); }
.wl-dot.is-on { background: var(--wl-warn-ink); }

.wl-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.wl-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.wl-row-name { font-size: 13px; font-weight: 500; }
.wl-row-val { font-size: 12px; color: var(--wl-ink-2); font-family: var(--wl-mono); text-align: right; }
.wl-row-bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--wl-surface-alt); overflow: hidden; position: relative; }
.wl-row-fill { height: 100%; border-radius: 4px; }
.wl-row.is-lead .wl-row-name::after { content: "· 방향 주도"; font-family: var(--wl-mono); font-size: 10px; color: var(--wl-warn-ink); margin-left: 6px; font-weight: 400; }

.wl-div { grid-column: 1/-1; height: 22px; position: relative; display: flex; align-items: center; }
.wl-div-axis { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--wl-border-2); }
.wl-div-fill { position: absolute; top: 5px; height: 12px; border-radius: 3px; }
.wl-div-fill.buy { left: 50%; background: var(--wl-buy); }
.wl-div-fill.sell { right: 50%; background: var(--wl-sell); }

.wl-periods { display: flex; gap: 4px; }
.wl-period { font: inherit; font-size: 11px; padding: 4px 9px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--wl-ink-3); cursor: pointer; }
.wl-period:hover { color: var(--wl-ink); }
.wl-period.is-active { border-color: var(--wl-border-2); background: var(--wl-surface); color: var(--wl-ink); }

.wl-chart { margin: 0; }
.wl-chart svg { display: block; width: 100%; height: auto; }
.wl-cap { font-size: 13px; color: var(--wl-ink-2); line-height: 1.55; margin: 0 0 12px; }
.wl-line { fill: none; stroke: var(--wl-ink); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.wl-line-dot { fill: var(--wl-ink); }
.wl-grid { stroke: var(--wl-border); stroke-width: 1; }
.wl-axislabel { font-family: var(--wl-mono); font-size: 10px; fill: var(--wl-ink-3); }
.wl-band-fear { fill: var(--wl-fear); opacity: .15; }
.wl-band-neutral { fill: var(--wl-neutral); opacity: .12; }
.wl-band-greed { fill: var(--wl-greed); opacity: .15; }
.wl-bar-op { fill: var(--wl-ink); opacity: .8; }

.wl-scale { position: relative; height: 46px; margin: 8px 0 4px; }
.wl-scale-track { position: absolute; left: 0; right: 0; top: 20px; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--wl-good-bg) 0 30%, var(--wl-surface-alt) 30% 70%, var(--wl-warn-bg) 70% 100%); }
.wl-scale-mark { position: absolute; top: 10px; width: 2px; height: 28px; background: var(--wl-ink); }
.wl-scale-mark::after { content: attr(data-label); position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  font-family: var(--wl-mono); font-size: 10px; color: var(--wl-ink); white-space: nowrap; }
.wl-scale-fwd { position: absolute; top: 16px; width: 2px; height: 16px; background: var(--wl-ink-3); }
.wl-scale-fwd::after { content: attr(data-label); position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  font-family: var(--wl-mono); font-size: 10px; color: var(--wl-ink-3); white-space: nowrap; }
.wl-scale-ends { display: flex; justify-content: center; font-family: var(--wl-mono); font-size: 10px; color: var(--wl-ink-3); }

.wl-section.wl-flash { animation: wl-flash 1.8s ease; }
@keyframes wl-flash { 0% { background: rgba(154,100,20,.10); } 100% { background: transparent; } }

/* ---- glossary pages ---- */
.wl-breadcrumb { font-family: var(--wl-mono); font-size: 11px; color: var(--wl-ink-3); margin: 0 0 20px; }
.wl-breadcrumb a { color: var(--wl-ink-3); }
.wl-breadcrumb a:hover { color: var(--wl-ink); }
.glossary-article p, .glossary-article li { font-size: 14px; line-height: 1.75; color: var(--wl-ink-2); margin: 0 0 10px; }
.glossary-article ul { margin: 0; padding-left: 1.2em; }
.glossary-article strong { color: var(--wl-ink); }
.glossary-article a { color: var(--wl-warn-ink); }

/* ---- data-source footer (all pages) ---- */
.wl-sources { font-size: 11px; color: var(--wl-ink-3); line-height: 1.7; }
.wl-sources span { display: block; margin: 0 0 3px; }

/* ---- glossary deep-links (injected by glossary-links.js on detail pages) ---- */
.glossary-deep-links { font-size: 12px; color: var(--wl-ink-3); }
.glossary-deep-links-label { font-family: var(--wl-mono); font-size: 11px; letter-spacing: .04em; color: var(--wl-ink-3); margin-right: 8px; }
.glossary-deep-links a { color: var(--wl-warn-ink); text-decoration: none; }
.glossary-deep-links a:hover { text-decoration: underline; }
.glossary-deep-links-sep { color: var(--wl-border-2); }

.wl-chips { display:flex; flex-wrap:wrap; gap:8px; }
.wl-chip { display:inline-flex; align-items:center; gap:6px; padding:8px 12px; border-radius:999px; font-size:14px; font-weight:500; text-decoration:none; color:inherit; }
.wl-chip-axis { font-family: var(--wl-mono); font-size:11px; opacity:.75; }
.wl-chip-content { display:flex; flex-direction:column; gap:2px; }
.wl-chip-sub { font-family:var(--wl-mono); font-size:10px; font-weight:400; opacity:.78; }
.wl-more { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.wl-diff, .wl-events, .wl-checklist { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }

@media (max-width: 460px) { .wl-verdict { grid-template-columns: 1fr; } .wl-title { font-size: 23px; } }
@media (max-width: 560px) { .mock-bar { padding: 10px 14px; } }
@media (prefers-reduced-motion: reduce) { .wl-section.wl-flash { animation: none; } .wl-panel { transition: none; } }

/* =========================================================================
   WIP Labs — sentiment-risk page tokens (its own .sr-* system, per mockup)
   ========================================================================= */
.sr {
  --sr-paper: #f5f1e8; --sr-surface: #fbf8f1; --sr-surface-alt: #f0ebdf;
  --sr-ink: #2b2a26; --sr-ink-2: #6b6a63; --sr-ink-3: #9a988f;
  --sr-border: #e3ddce; --sr-border-2: #cec7b4;
  --sr-warn-ink: #9a6414; --sr-warn-bg: #f3e7cf;
  --sr-fear: #c65a3a; --sr-greed: #2f8f6f; --sr-neutral: #8f8d84;
  --sr-radius: 12px; --sr-radius-sm: 8px;
  --sr-mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  max-width: 720px; margin: 0 auto; padding: 24px 18px 56px;
  color: var(--sr-ink); -webkit-font-smoothing: antialiased;
}
.sr-head { margin-bottom: 28px; }
.sr-eyebrow { font-family: var(--sr-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--sr-ink-3); margin: 0 0 8px; }
.sr-title { font-size: 26px; font-weight: 600; margin: 0 0 8px; line-height: 1.2; }
.sr-lede { font-size: 15px; color: var(--sr-ink-2); line-height: 1.6; margin: 0 0 10px; max-width: 52ch; }
.sr-basis { font-family: var(--sr-mono); font-size: 12px; color: var(--sr-ink-3); margin: 0; }
.sr-section { padding: 22px 0; border-top: 1px solid var(--sr-border); }
.sr-section:first-of-type { border-top: 0; padding-top: 6px; }
.sr-section:focus { outline: none; }
.sr-kicker { font-family: var(--sr-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--sr-ink-3); margin: 0 0 12px; font-weight: 500; }
.sr-h2 { font-size: 17px; font-weight: 600; margin: 0; }
.sr-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sr-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sr-panel {
  display: flex; flex-direction: column; gap: 6px; background: var(--sr-surface);
  border: 1px solid var(--sr-border); border-radius: var(--sr-radius); padding: 14px;
  text-decoration: none; color: inherit; transition: border-color .15s ease, background .15s ease;
}
.sr-panel:hover, .sr-panel:focus-visible { border-color: var(--sr-border-2); background: #fffdf7; outline: none; }
.sr-panel[data-panel="risk"] { background: var(--sr-warn-bg); border-color: #e7d5b0; }
.sr-panel[data-panel="risk"]:hover { background: #f6ebd6; }
.sr-panel-label { font-size: 12px; color: var(--sr-ink-2); }
.sr-panel[data-panel="risk"] .sr-panel-label { color: var(--sr-warn-ink); }
.sr-panel-state { font-size: 21px; font-weight: 600; line-height: 1.15; }
.sr-panel[data-panel="risk"] .sr-panel-state { color: var(--sr-warn-ink); }
.sr-panel-basis { font-size: 12px; color: var(--sr-ink-2); line-height: 1.5; min-height: 2.2em; }
.sr-panel[data-panel="risk"] .sr-panel-basis { color: var(--sr-warn-ink); }
.sr-panel-axis { font-family: var(--sr-mono); font-size: 10px; letter-spacing: .04em; color: var(--sr-ink-3); margin-top: 2px; }
.sr-panel[data-panel="risk"] .sr-panel-axis { color: #b48a4a; }
.sr-note { font-size: 12px; color: var(--sr-ink-3); margin: 12px 0 0; line-height: 1.5; }
.sr-delta { font-size: 12px; color: var(--sr-ink-2); font-family: var(--sr-mono); }
.sr-delta .sr-arrow-up { color: var(--sr-warn-ink); }
.sr-delta .sr-arrow-down { color: var(--sr-greed); }
.sr-score { display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.sr-score-value { font-size: 30px; font-weight: 600; color: var(--sr-warn-ink); line-height: 1; }
.sr-score-max { font-size: 14px; color: var(--sr-ink-3); }
.sr-stage { font-size: 12px; background: var(--sr-warn-bg); color: var(--sr-warn-ink); padding: 3px 9px; border-radius: 6px; align-self: center; }
.sr-indicators { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sr-ind { display: flex; align-items: center; justify-content: space-between; }
.sr-ind-name { font-size: 13px; color: var(--sr-ink-2); }
.sr-ind-right { display: flex; align-items: center; gap: 7px; }
.sr-dots { display: flex; gap: 4px; }
.sr-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sr-border-2); }
.sr-dot.is-on { background: var(--sr-warn-ink); }
.sr-ind-score { font-size: 12px; color: var(--sr-ink-3); min-width: 10px; text-align: right; font-family: var(--sr-mono); }
.sr-ind-chg { font-size: 11px; }
.sr-ind-chg.dir-up { color: var(--sr-warn-ink); }
.sr-ind-chg.dir-down { color: var(--sr-greed); }
.sr-scale { list-style: none; margin: 12px 0 0; padding: 0; display: flex; justify-content: space-between; font-family: var(--sr-mono); font-size: 10px; color: var(--sr-ink-3); }
.sr-periods { display: flex; gap: 4px; }
.sr-period { font-size: 11px; padding: 4px 9px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--sr-ink-3); cursor: pointer; font: inherit; }
.sr-period:hover { color: var(--sr-ink); }
.sr-period.is-active { border-color: var(--sr-border-2); background: var(--sr-surface); color: var(--sr-ink); }
.sr-caption { font-size: 13px; color: var(--sr-ink-2); line-height: 1.55; margin: 0 0 12px; }
.sr-chart { margin: 0; }
.sr-chart-mount svg { display: block; width: 100%; height: auto; }
.sr-band-fear { fill: var(--sr-fear); opacity: .15; }
.sr-band-neutral { fill: var(--sr-neutral); opacity: .12; }
.sr-band-greed { fill: var(--sr-greed); opacity: .15; }
.sr-band-label { font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; font-size: 10px; fill: var(--sr-ink-3); }
.sr-line { fill: none; stroke: var(--sr-ink); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.sr-line-dot { fill: var(--sr-ink); }
.sr-vkospi-grid { stroke: var(--sr-border); stroke-width: 1; }
.sr-vkospi-line { fill: none; stroke: var(--sr-warn-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sr-vkospi-dot { fill: var(--sr-warn-ink); }
.sr-vkospi { padding-top: 16px; padding-bottom: 16px; }
.sr-vkospi .sr-score-value { font-size: 28px; }
.sr-vkospi .sr-score-max { font-size: 11px; }
.sr-vkospi .sr-chart { margin-top: 8px; }
.sr-source { font-size: 12px; color: var(--sr-ink-3); line-height: 1.55; margin: 14px 0 0; max-width: 58ch; }
.sr-detail-list { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }
.sr-detail-item { padding: 14px; background: var(--sr-surface); border: 1px solid var(--sr-border); border-radius: var(--sr-radius); }
.sr-detail-name { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.sr-detail-score { font-family: var(--sr-mono); font-size: 11px; color: var(--sr-ink-3); font-weight: 400; white-space: nowrap; }
.sr-detail-item p { margin: 0 0 6px; font-size: 13px; line-height: 1.6; color: var(--sr-ink-2); }
.sr-detail-item p:last-child { margin-bottom: 0; }
.sr-detail-item strong { color: var(--sr-ink); font-weight: 600; margin-right: 4px; }
.sr-section.sr-flash { animation: sr-flash 1.8s ease; }
@keyframes sr-flash { 0% { background: rgba(154,100,20,.10); } 100% { background: transparent; } }
@media (max-width: 460px) { .sr-summary-grid { grid-template-columns: 1fr; } .sr-title { font-size: 23px; } }
@media (prefers-reduced-motion: reduce) { .sr-section.sr-flash { animation: none; } .sr-panel { transition: none; } }
