/* ── reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, dl, dd, figure { margin: 0; }

/* ── tokens ─────────────────────────────────────────────── */
:root {
  --ink:        #111214;
  --ink-soft:   #3c3f44;
  --muted:      #8b9096;
  --faint:      #b9bec4;
  --rule:       #e6e8ea;
  --rule-strong:#2b2e33;
  --link:       #1a73e8;
  --bg:         #ffffff;

  --col: 660px;
  --font: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont,
          "Segoe UI", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo",
          Roboto, Helvetica, Arial, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── header bar ─────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-top: 2px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
}

.topbar__inner {
  max-width: var(--col);
  margin: 0 auto;
  padding: 15px 24px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ── sheet ──────────────────────────────────────────────── */
.sheet {
  max-width: var(--col);
  margin: 0 auto;
  padding: 72px 24px 96px;
}

/* ── cover ──────────────────────────────────────────────── */
.cover__kicker {
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  margin-bottom: 26px;
}

.cover__title {
  text-align: center;
  font-size: clamp(20px, 4.2vw, 26px);
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.cover__title-em { white-space: nowrap; }

.cover__subtitle {
  text-align: center;
  margin-top: 20px;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.005em;
  color: var(--faint);
}

.cover__rule {
  width: 52px;
  height: 0;
  margin: 46px auto;
  border: 0;
  border-top: 1px solid var(--rule-strong);
}

/* ── meta list ──────────────────────────────────────────── */
.meta { margin: 0 auto; max-width: 460px; }

.meta__row + .meta__row { margin-top: 26px; }

.meta__label {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-bottom: 5px;
}

.meta__value {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.meta__note {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}

.meta__value a,
.meta a {
  color: var(--link);
  font-weight: 400;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.meta a:hover,
.meta a:focus-visible { text-decoration: underline; }

/* ── next ───────────────────────────────────────────────── */
.next {
  margin-top: 72px;
  text-align: center;
}

.next a {
  display: inline-block;
  padding: 6px 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  text-decoration: none;
}

.next a:hover,
.next a:focus-visible { color: var(--ink); text-decoration: underline; }

/* ── narrow screens ─────────────────────────────────────── */
@media (max-width: 520px) {
  .sheet { padding: 48px 20px 72px; }
  .cover__title-em { white-space: normal; }
  .cover__rule { margin: 36px auto; }
  .next { margin-top: 56px; }
}

/* ── page title ─────────────────────────────────────────── */
.page-title {
  text-align: center;
  font-size: clamp(20px, 4.2vw, 26px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* ── table of contents ──────────────────────────────────── */
.toc { margin: 0 auto; max-width: 460px; }

.toc__section + .toc__section {
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px solid var(--rule);
}

.toc__heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.toc__num {
  flex: none;
  min-width: 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--link);
  font-variant-numeric: tabular-nums;
}

.toc__items {
  list-style: none;
  margin: 14px 0 0;
  padding: 0 0 0 30px;
}

.toc__item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.5;
}

.toc__item + .toc__item { margin-top: 9px; }

.toc__sub {
  flex: none;
  min-width: 26px;
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.toc__item a {
  color: var(--ink-soft);
  text-decoration: none;
}

.toc__item a:hover,
.toc__item a:focus-visible { color: var(--link); text-decoration: underline; }

/* 아직 문서가 없는 항목 */
.toc__pending { color: var(--muted); }

@media (max-width: 520px) {
  .toc__items { padding-left: 0; }
}

/* ═══ wide pages ════════════════════════════════════════ */
body.is-wide { --col: 1080px; }

.page-lead {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ── section block ──────────────────────────────────────── */
.block + .block { margin-top: 52px; }

.block__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-strong);
  margin-bottom: 18px;
}

.block__note {
  margin: -6px 0 16px;
  font-size: 13px;
  color: var(--ink-soft);
}

.block__asof { color: var(--faint); }

/* ── owner chips ────────────────────────────────────────── */
.chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.chip--sm { padding: 2px 7px; font-size: 11.5px; }

.chip--pm       { background: #f1ecfe; color: #5b21b6; }
.chip--flutter  { background: #e4f2fb; color: #075985; }
.chip--pipeline { background: #e3f5ee; color: #065f46; }
.chip--agent    { background: #fdeee2; color: #9a3412; }

/* ── tables ─────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.65;
}

.tbl th,
.tbl td {
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

.tbl th {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
  border-bottom-color: var(--rule-strong);
}

.tbl td { color: var(--ink-soft); }

.tbl tbody tr:last-child td { border-bottom: 0; }

.tbl__strong  { color: var(--ink); font-weight: 600; }
.tbl__muted   { color: var(--muted); }
.tbl__nowrap  { white-space: nowrap; }
.tbl__goal    { color: var(--ink); font-weight: 500; }

.tbl--team  { min-width: 640px; }
.tbl--sprint{ min-width: 1000px; }
.tbl--sprint td { font-size: 12.5px; }

/* ── scrum rules ────────────────────────────────────────── */
.rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px 28px;
  margin: 0;
}

.rules__row {
  border-left: 2px solid var(--rule);
  padding-left: 12px;
}

.rules dt {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.rules dd {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── kanban ─────────────────────────────────────────────── */
.kanban {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}

.kanban__col {
  flex: 0 0 202px;
  display: flex;
  flex-direction: column;
}

.kanban__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--rule-strong);
}

.kanban__name {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.kanban__count {
  flex: none;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f1f3f5;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.kanban__wip {
  padding: 6px 0 10px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--faint);
}

.kanban__cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 10px 11px 9px;
  background: #fff;
}

.card--done { background: #fafbfc; }

.card--done .card__title {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--faint);
}

.card__title {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 9px;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.card__pts {
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── definition of done ─────────────────────────────────── */
.dod {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px 24px;
}

.dod li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.dod li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 5px;
  height: 9px;
  border-right: 2px solid var(--link);
  border-bottom: 2px solid var(--link);
  transform: rotate(45deg);
}

@media (max-width: 520px) {
  .block + .block { margin-top: 40px; }
  .page-lead br { display: none; }
}
