/* 건축원가지수 페이지 — base.css 의 토큰을 그대로 쓴다 */

.asof {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--steel);
}

/* ── 지수 카드 ── */
.idxgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.idxcard {
  border: 2px solid var(--ink);
  padding: 20px 20px 18px;
  background: var(--white);
}
.idxcard.lead {
  background: var(--ink);
  color: var(--white);
  box-shadow: 8px 8px 0 var(--orange);
}
.idxcard h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.idxcard .v {
  font-family: "NanumSquareNeo", sans-serif;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
  margin-top: 8px;
}
.idxcard .sub {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--steel);
  line-height: 1.6;
}
.idxcard.lead .sub {
  color: #b9bcc1;
}
.idxcard .d {
  display: inline-block;
  font-weight: 700;
}
.up {
  color: var(--orange-deep);
}
.down {
  color: #1d6fa5;
}
.flat {
  color: var(--steel);
}
.idxcard.lead .up {
  color: #ffb38a;
}
.idxcard.lead .down {
  color: #8fd0ff;
}
.base-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--steel);
}

/* ── 체감 ── */
.feel {
  background: var(--concrete);
}
.feelbox {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 26px;
}
.feelin label {
  display: block;
  margin-bottom: 14px;
}
.feelin label > span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
}
.feelin label em {
  font-style: normal;
  font-weight: 500;
  color: var(--steel);
}
.feelin input,
.feelin select {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
}
.feelin .hint {
  font-size: 12px;
  color: var(--steel);
  line-height: 1.6;
  margin-top: 10px;
}
.feelout {
  background: var(--ink);
  color: var(--white);
  padding: 26px 26px 22px;
}
.feelout .big {
  font-family: "NanumSquareNeo", sans-serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.3;
  color: var(--orange);
}
.feelout .big small {
  display: block;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #b9bcc1;
  margin-bottom: 4px;
}
.frow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #34373c;
  font-size: 14px;
}
.frow:last-of-type {
  border-bottom: 0;
}
.frow b {
  font-size: 15px;
}
.feelout .fnote {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #9da0a5;
}

/* ── 칩 ── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 8px;
}
.chip {
  border: 1.5px solid var(--line);
  background: var(--white);
  color: #44474c;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.chip:hover {
  border-color: var(--orange);
}
.chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

/* ── 차트 ── */
.chartbox {
  margin-top: 12px;
  border: 1.5px solid var(--line);
  background: var(--white);
  padding: 16px 12px 8px;
  overflow-x: auto;
}
.chartbox svg {
  display: block;
  width: 100%;
  min-width: 520px;
  height: auto;
}
.chartbox .gl {
  stroke: var(--line);
  stroke-width: 1;
}
.chartbox .zero {
  stroke: #b9bcc1;
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.chartbox text {
  font-size: 11px;
  fill: var(--steel);
  font-family: "Noto Sans KR", sans-serif;
}
.chartbox .ln {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chartbox .bar {
  fill: var(--orange);
  opacity: 0.85;
}
.chartbox .dot {
  stroke: #fff;
  stroke-width: 2;
}
.legend2 {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  font-size: 12.5px;
}
.legend2 span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend2 i {
  width: 14px;
  height: 3px;
  display: block;
}

/* ── 이번 달 이야기 ── */
.report {
  background: var(--concrete);
}
.rlines {
  list-style: none;
  margin-top: 8px;
}
.rlines li {
  position: relative;
  padding: 13px 0 13px 26px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.75;
  word-break: keep-all;
}
.rlines li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 22px;
  width: 8px;
  height: 8px;
  background: var(--orange);
}
.rlines li:last-child {
  border-bottom: 0;
}

/* ── 표 ── */
.tablewrap {
  margin-top: 18px;
  overflow-x: auto;
}
table.dt {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}
table.dt th,
table.dt td {
  border: 1px solid var(--line);
  padding: 9px 11px;
  text-align: left;
  vertical-align: middle;
}
table.dt thead th {
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
table.dt thead th[data-sort] {
  cursor: pointer;
}
table.dt thead th[data-sort]:hover {
  background: var(--orange-deep);
}
table.dt .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table.dt tbody tr:nth-child(even) {
  background: #fafafa;
}
table.dt tbody tr:hover {
  background: #fff7f3;
}
table.dt .rank {
  font-weight: 700;
  color: var(--steel);
}
.tag-g {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  background: var(--concrete);
  color: #44474c;
}

/* ── 진행 현장 ── */
.livegrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 8px;
}
.livecard {
  border: 1.5px solid var(--line);
  padding: 16px 16px 14px;
  background: var(--white);
}
.livecard .n {
  font-family: "NanumSquareNeo", sans-serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
}
.livecard .t {
  font-size: 13px;
  font-weight: 700;
  color: var(--steel);
  margin-bottom: 4px;
}
.livecard .h {
  font-size: 11.5px;
  color: var(--steel);
  margin-top: 6px;
  line-height: 1.5;
}
.livecard.hl {
  border-color: var(--orange);
  background: #fff7f3;
}

/* ── 월별 아카이브 ── */
.archive {
  background: var(--concrete);
}
.arlist {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.arcard {
  display: block;
  padding: 12px 12px 10px;
  background: var(--white);
  border: 1.5px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition:
    border-color 0.12s,
    transform 0.12s;
}
.arcard:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
}
.arcard .m {
  display: block;
  font-size: 12px;
  color: var(--steel);
  font-weight: 700;
}
.arcard b {
  display: block;
  font-family: "NanumSquareNeo", sans-serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  margin: 2px 0 1px;
}
.arcard .d {
  font-size: 12px;
}

/* ── 아카이브 페이지의 앞뒤달 이동 ── */
.ar-navs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.ar-nav {
  display: inline-block;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}
.ar-nav:hover {
  border-color: var(--orange);
  color: var(--orange-deep);
}
.ar-nav.now {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.ar-nav.off {
  color: #b9bcc1;
  border-style: dashed;
}

/* ── 방법론 ── */
.method {
  background: var(--ink);
  color: var(--white);
}
.method .lead,
.method .eyebrow {
  color: #b9bcc1;
}
.mgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 10px;
}
.mcard h3 {
  font-family: "NanumSquareNeo", sans-serif;
  font-weight: 400;
  font-size: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--orange);
  margin-bottom: 12px;
}
.mcard p,
.mcard li {
  font-size: 13.5px;
  line-height: 1.75;
  color: #d5d7d9;
  word-break: keep-all;
}
.mcard ul {
  list-style: none;
}
.mcard ul li {
  padding: 7px 0 7px 14px;
  position: relative;
  border-bottom: 1px solid #34373c;
}
.mcard ul li::before {
  content: "·";
  position: absolute;
  left: 2px;
  color: var(--orange);
  font-weight: 700;
}
.mcard .limits li {
  color: #e6e8ea;
}
.wtable {
  margin-top: 14px;
}
.wtable h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  margin: 12px 0 6px;
}
.wbar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  padding: 3px 0;
  color: #d5d7d9;
}
.wbar span:first-child {
  flex: 0 0 128px;
}
.wbar .b {
  flex: 1;
  height: 8px;
  background: #34373c;
  position: relative;
}
.wbar .b i {
  display: block;
  height: 100%;
  background: var(--orange);
}
.wbar .p {
  flex: 0 0 34px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── 반응형 ── */
@media (max-width: 900px) {
  .idxgrid {
    grid-template-columns: 1fr 1fr;
  }
  .feelbox,
  .mgrid {
    grid-template-columns: 1fr;
  }
  .livegrid {
    grid-template-columns: 1fr 1fr;
  }
  .arlist {
    grid-template-columns: repeat(3, 1fr);
  }
  .idxcard .v {
    font-size: 32px;
  }
  .feelout .big {
    font-size: 24px;
  }
}
@media (max-width: 560px) {
  .idxgrid {
    grid-template-columns: 1fr;
  }
  .arlist {
    grid-template-columns: 1fr 1fr;
  }
}

/* 아카이브 연도 구분 — 66장이 한 덩어리로 붙으면 어느 해인지 못 찾는다 */
.aryear {
  grid-column: 1 / -1;
  margin: 16px 0 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--steel);
  letter-spacing: 0.04em;
}
.aryear:first-child {
  margin-top: 0;
}

/* ═══ 인용하실 때 (cite.js 가 만든다 · 토니 2026-08-17) ═══
   준비서면에 옮겨 적을 수 있게 출처 한 줄을 통째로 준다.
   ⚠️ 광고처럼 보이면 안 된다. 회색 바탕에 조용히 둔다. */
.cite {
  background: var(--concrete);
  border-top: 1px solid var(--line);
  padding: 30px 0 34px;
}
.cite h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}
.cite .cite-why {
  font-size: 13.5px;
  color: var(--steel);
  line-height: 1.7;
  margin-bottom: 12px;
  word-break: keep-all;
}
.cite .cite-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}
.cite code {
  flex: 1 1 420px;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 11px 13px;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
  word-break: break-all;
}
.cite button {
  flex: 0 0 auto;
  border: 0;
  background: var(--ink);
  color: #fff;
  padding: 0 20px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.cite button:hover {
  background: var(--orange-deep);
}
.cite .cite-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--steel);
  word-break: keep-all;
}
@media print {
  .cite button {
    display: none;
  }
}
