/* ideas.alignplace.kr — 내부 리서치 보드.
   alignplace.kr 의 토큰(Action Blue, SF 사다리)을 그대로 쓰되 밀도만 높였다. */

:root {
  --primary: #0066cc;
  --primary-soft: #eaf2fd;
  --canvas: #f5f5f7;
  --paper: #ffffff;
  --ink: #1d1d1f;
  --ink-muted: #6e6e73;
  --hairline: #e0e0e2;
  --good: #1a8b5f;
  --warn: #a86300;
  --bad: #c0392b;
  --r: 12px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
          "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 15px/1.6 var(--font); -webkit-text-size-adjust: 100%;
  word-break: keep-all;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -.02em; font-weight: 700; margin: 0; }
h1 { font-size: clamp(26px, 3.4vw, 38px); }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0 0 12px; }
:focus-visible { outline: 3px solid #7fb2f0; outline-offset: 2px; border-radius: 4px; }

/* 크롬 */
.nav { background: #1d1d1f; color: #fff; }
.nav .inner { display: flex; gap: 22px; align-items: center; padding: 12px 0; }
.nav a { color: #fff; font-weight: 600; font-size: 14px; opacity: .72; }
.nav a:hover { opacity: 1; text-decoration: none; }
.nav a.on { opacity: 1; }
.nav .brand { margin-right: auto; font-weight: 700; letter-spacing: -.02em; opacity: 1; }
.inner, main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
main { padding: 28px 0 72px; }
footer { border-top: 1px solid var(--hairline); color: var(--ink-muted); font-size: 13px; padding: 20px 0 40px; }

/* 공통 블록 */
.card { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r); padding: 20px; }
.muted { color: var(--ink-muted); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--ink-muted); margin: 0 0 6px; text-transform: uppercase; }
.stack > * + * { margin-top: 16px; }
.section { margin-top: 40px; }
.section > h2 { padding-bottom: 12px; border-bottom: 1px solid var(--hairline); margin-bottom: 18px; }

/* 배지 */
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; background: var(--primary-soft); color: var(--primary); white-space: nowrap; }
.badge.good { background: #e6f4ee; color: var(--good); }
.badge.warn { background: #fdf1de; color: var(--warn); }
.badge.bad  { background: #fbeae8; color: var(--bad); }
.badge.grey { background: #ececee; color: var(--ink-muted); }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* 요약 숫자 */
.snapshot { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--r); overflow: hidden; margin: 22px 0 0; }
.snapshot div { background: var(--paper); padding: 14px 16px; }
.snapshot dt { font-size: 11px; font-weight: 700; color: var(--ink-muted); margin-bottom: 6px; }
.snapshot dd { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }

/* 툴바 */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 26px 0 0; }
.toolbar input { flex: 1; min-width: 220px; height: 42px; padding: 0 14px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--paper); font: inherit; }
.toolbar button { height: 42px; padding: 0 14px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--paper); color: var(--ink-muted); font: 600 14px var(--font); cursor: pointer; }
.toolbar button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 카드 그리드 */
.batch-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.idea-card { display: flex; flex-direction: column; gap: 12px; }
.idea-card .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.idea-card .score { margin-left: auto; font-size: 22px; font-weight: 700; color: var(--primary); }
.idea-card .score small { font-size: 11px; color: var(--ink-muted); font-weight: 600; }
.idea-card h3 a { color: inherit; }
.idea-card .problem { background: #f7f7f9; border-radius: 8px; padding: 12px; font-size: 13px; color: var(--ink-muted); }
.idea-card .actions { display: flex; gap: 8px; margin-top: auto; }
.idea-card .actions a { flex: 1; display: grid; place-items: center; min-height: 40px; border: 1px solid var(--hairline); border-radius: 9px; font-size: 13px; font-weight: 600; padding: 0 10px; }
.idea-card .actions a.primary { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 표 */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
th { font-size: 11px; letter-spacing: .06em; color: var(--ink-muted); text-transform: uppercase; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.nowrap, th.nowrap { white-space: nowrap; }

/* 점수 막대 */
.scores { display: grid; gap: 8px; }
.scores .row { display: grid; grid-template-columns: 120px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.scores .bar { height: 8px; background: #ececee; border-radius: 999px; overflow: hidden; }
.scores .bar span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.scores .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-muted); }

/* 단계 타임라인 */
.pipe { display: flex; flex-wrap: wrap; gap: 6px; }
.pipe li { list-style: none; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: #ececee; color: var(--ink-muted); }
.pipe li.done { background: var(--primary-soft); color: var(--primary); }
.pipe li.now { background: var(--primary); color: #fff; }

/* 프로토타입 */
.preview { border: 1px solid var(--hairline); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.preview iframe { display: block; width: 100%; height: 720px; border: 0; }

/* 본문(마크다운) */
.doc { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r); padding: clamp(18px, 3vw, 32px); }
.doc h1, .doc h2, .doc h3 { margin: 26px 0 10px; }
.doc h1:first-child, .doc h2:first-child { margin-top: 0; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc code { font: 13px/1.5 var(--mono); background: #f2f2f4; border-radius: 4px; padding: 1px 5px; }
.doc pre { background: #f2f2f4; border-radius: 8px; padding: 14px; overflow-x: auto; }
.doc pre code { background: none; padding: 0; }
.doc blockquote { margin: 0 0 14px; padding-left: 14px; border-left: 3px solid var(--hairline); color: var(--ink-muted); }
.doc table { margin-bottom: 14px; }
details.doc-wrap { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r); }
details.doc-wrap > summary { cursor: pointer; padding: 16px 20px; font-weight: 600; }
details.doc-wrap > .doc { border: 0; border-top: 1px solid var(--hairline); border-radius: 0; }

/* 로그 */
.log { background: #1d1d1f; color: #e6e6e6; border-radius: var(--r); padding: 18px; overflow-x: auto; font: 12px/1.65 var(--mono); white-space: pre-wrap; word-break: break-all; }
.log .err { color: #ff8a80; }

.empty { text-align: center; padding: 60px 20px; }
[hidden] { display: none !important; }

@media (max-width: 620px) {
  .scores .row { grid-template-columns: 96px 1fr 40px; }
  .preview iframe { height: 560px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
