:root {
  --paper-w: 1240;
  --paper-h: 1754;
  --ink: #15243a;
  --muted: #607086;
  --navy: #17365f;
  --navy-2: #0b2545;
  --blue: #24669b;
  --sky: #dcecf7;
  --red: #b4232a;
  --gold: #c4922f;
  --line: #d5dce4;
  --soft: #f4f7fa;
  --paper: #fff;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #dfe4e8; }
body {
  color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: text;
}
body.pdf-exporting [data-pdf-exclude] { display: none !important; }

#document-stage { position: fixed; inset: 0; overflow: hidden; }
#page-frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 1240px;
  height: 1754px;
  transform-origin: top left;
  background: white;
  box-shadow: 0 22px 80px rgba(15, 28, 45, .22);
}
#page-host { width: 100%; height: 100%; }

.paper {
  position: absolute;
  inset: 0;
  width: 1240px;
  height: 1754px;
  overflow: hidden;
  background: var(--paper);
}
.paper[hidden] { display: none !important; }
.paper__inner { position: absolute; inset: 0; padding: 92px 96px 84px; }
.paper__inner--cover { padding: 0; }
.paper__content { height: 1454px; overflow: hidden; }

.page-kicker {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--blue);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .12em;
}
.page-kicker::before { content: ""; width: 34px; height: 5px; border-radius: 9px; background: var(--red); }
.page-title {
  margin: 22px 0 18px;
  color: var(--navy-2);
  font-size: 48px;
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -.04em;
}
.page-lead { margin: 0; color: #455b73; font-size: 23px; line-height: 1.62; letter-spacing: -.018em; }
.section-rule { margin: 30px 0 34px; height: 1px; background: linear-gradient(90deg, var(--navy), var(--line) 70%, transparent); }

.footer {
  position: absolute;
  left: 96px;
  right: 96px;
  bottom: 38px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: #718095;
  font-size: 15px;
}
.footer::before { content: "TECHNICAL PROPOSAL · DRAFT"; font-weight: 750; letter-spacing: .08em; }
.footer::after { content: "다층 박막 필터 및 회로단 압축센싱"; text-align: right; }
.footer__page { min-width: 48px; text-align: center; color: var(--navy); font-size: 17px; font-weight: 900; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stack { display: grid; gap: 20px; }
.card { border: 1px solid var(--line); border-radius: 18px; background: white; padding: 25px 27px; }
.card--soft { background: var(--soft); }
.card--blue { border-color: #b9d2e4; background: #edf6fb; }
.card--navy { border: 0; color: white; background: linear-gradient(145deg, var(--navy-2), var(--navy)); }
.card--red { border-color: #e7c3c5; background: #fff6f6; }
.card__eyebrow { margin-bottom: 9px; color: var(--blue); font-size: 16px; font-weight: 900; letter-spacing: .08em; }
.card__title { margin: 0 0 10px; color: var(--navy-2); font-size: 25px; line-height: 1.34; font-weight: 900; letter-spacing: -.025em; }
.card--navy .card__title, .card--navy .card__eyebrow { color: white; }
.card__text { margin: 0; color: #4b5e73; font-size: 18px; line-height: 1.6; }
.card--navy .card__text { color: #d9e7f4; }

.metric { padding: 22px; border-top: 5px solid var(--blue); background: var(--soft); }
.metric__value { color: var(--navy-2); font-size: 35px; font-weight: 950; letter-spacing: -.04em; }
.metric__label { margin-top: 6px; color: #566a7f; font-size: 16px; line-height: 1.4; }
.badge { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 10px; border-radius: 7px; color: #1f5d89; background: #e4f1f9; font-size: 14px; font-weight: 850; }
.badge--red { color: #9a1d25; background: #fbe9ea; }
.badge--gold { color: #805913; background: #fbf1dc; }
.input-needed { color: #9b1c26; font-weight: 850; }

.body-copy { color: #3f5267; font-size: 19px; line-height: 1.68; }
.body-copy p { margin: 0 0 15px; }
.body-copy strong { color: var(--navy-2); font-weight: 900; }
.clean-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.clean-list li { position: relative; padding-left: 22px; color: #42556a; font-size: 18px; line-height: 1.52; }
.clean-list li::before { content: ""; position: absolute; left: 0; top: .68em; width: 8px; height: 8px; border-radius: 99px; background: var(--red); }
.clean-list--check li::before { width: 12px; height: 7px; border-radius: 0; border-left: 3px solid var(--blue); border-bottom: 3px solid var(--blue); background: none; transform: rotate(-45deg); top: .5em; }

.table-wrap { overflow: hidden; border: 1px solid #cfd7e0; border-radius: 14px; }
.doc-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.doc-table th { padding: 13px 14px; color: white; background: var(--navy); font-size: 15px; line-height: 1.4; text-align: left; }
.doc-table td { padding: 12px 14px; border-top: 1px solid #dce2e8; color: #405268; background: white; font-size: 15px; line-height: 1.42; vertical-align: top; }
.doc-table tbody tr:nth-child(even) td { background: #f7f9fb; }
.doc-table .center { text-align: center; }
.doc-table .strong { color: var(--navy-2); font-weight: 900; }
.doc-table--compact th { padding: 9px 11px; font-size: 13px; }
.doc-table--compact td { padding: 8px 11px; font-size: 13px; line-height: 1.34; }

.callout { position: relative; padding: 21px 24px 21px 30px; border-left: 6px solid var(--red); background: #f7f9fb; }
.callout__title { margin: 0 0 7px; color: var(--navy-2); font-size: 20px; font-weight: 900; }
.callout__text { margin: 0; color: #4a5e73; font-size: 17px; line-height: 1.55; }
.footnote { color: #68788d; font-size: 13px; line-height: 1.48; }
.source-note { color: #68788d; font-size: 13px; line-height: 1.45; }

.flow { display: flex; align-items: stretch; gap: 12px; }
.flow__item { flex: 1; position: relative; min-height: 148px; padding: 22px 18px; border-radius: 16px; border: 1px solid #cad5df; background: white; }
.flow__item:not(:last-child)::after { content: "›"; position: absolute; z-index: 2; right: -17px; top: 50%; transform: translateY(-53%); color: var(--red); background: white; font-size: 37px; font-weight: 900; }
.flow__step { color: var(--red); font-size: 14px; font-weight: 900; letter-spacing: .08em; }
.flow__title { margin: 8px 0; color: var(--navy-2); font-size: 19px; line-height: 1.3; font-weight: 900; }
.flow__text { color: #55687c; font-size: 14px; line-height: 1.45; }

.spectrum { position: relative; overflow: hidden; border-radius: 18px; background: #07182e; }
.spectrum::before { content: ""; position: absolute; inset: 0; opacity: .9; background: linear-gradient(90deg, #512489, #1947ac 13%, #008bd1 25%, #00a882 39%, #7bbd2f 52%, #f0d32b 66%, #f79a23 80%, #cf2935); }
.spectrum::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,24,46,.15), rgba(7,24,46,.95)); }

.reference-figure { margin: 0; padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.reference-figure img { display: block; width: 100%; height: 100%; object-fit: contain; }
.reference-figure figcaption { margin-top: 10px; color: #68788d; font-size: 12px; line-height: 1.42; }

.chapter-band { position: absolute; inset: 0 0 auto; height: 28px; background: linear-gradient(90deg, var(--red) 0 11%, var(--navy-2) 11% 100%); }
.cover-grid { position: absolute; inset: 0; overflow: hidden; background: #f7f9fb; }
.cover-grid::before { content: ""; position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(#d9e0e8 1px, transparent 1px), linear-gradient(90deg, #d9e0e8 1px, transparent 1px); background-size: 62px 62px; }
.cover-slab { position: absolute; left: 0; right: 0; bottom: 0; height: 49%; background: linear-gradient(145deg, #0b2545, #173f69); clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 100%); }
.cover-ribbon { position: absolute; top: 0; right: 92px; width: 190px; height: 720px; background: rgba(180,35,42,.93); clip-path: polygon(0 0, 100% 0, 100% 83%, 50% 100%, 0 83%); }

.plan-page .paper__content { height: 1464px; }
.plan-summary { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.plan-summary__item { min-height: 116px; padding: 16px 12px; border-radius: 12px; background: var(--soft); border-top: 4px solid var(--navy); }
.plan-summary__item b { display: block; color: var(--navy-2); font-size: 19px; }
.plan-summary__item span { display: block; margin-top: 5px; color: #607086; font-size: 13px; line-height: 1.35; }

.no-select { user-select: none; }
@media print {
  html, body { overflow: visible; background: white; }
  #document-stage { position: static; display: block; overflow: visible; }
  #page-frame { position: static; left: auto; top: auto; width: 1240px; height: auto; transform: none !important; box-shadow: none; }
  .paper { position: relative; page-break-after: always; }
  .paper[hidden] { display: block !important; }
}

/* Research-proposal body layout: based on the dense, narrative reference documents. */
.proposal-doc {
  --doc-ink: #111827;
  --doc-muted: #475569;
  --doc-blue: #164e78;
  --doc-cyan: #0e7490;
  --doc-red: #9f2d32;
  --doc-line: #94a3b8;
  color: var(--doc-ink);
  background: #fff;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
.proposal-doc .paper__inner {
  padding: 70px 82px 72px;
}
.proposal-doc .paper__content {
  height: 1534px;
  overflow: hidden;
}
.proposal-doc .doc-header {
  margin: 0 0 18px;
  padding: 0 0 10px;
  border-bottom: 2px solid var(--doc-blue);
  color: #526274;
  font-size: 14px;
  line-height: 1.3;
  text-align: right;
}
.proposal-doc .doc-heading-1 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 31px;
  line-height: 1.32;
  font-weight: 800;
  letter-spacing: -.025em;
}
.proposal-doc .doc-heading-2 {
  margin: 20px 0 12px;
  color: #172033;
  font-size: 23px;
  line-height: 1.42;
  font-weight: 800;
  letter-spacing: -.018em;
}
.proposal-doc .doc-heading-2 .continued,
.proposal-doc .doc-heading-3 .continued {
  margin-left: 8px;
}
.proposal-doc .doc-heading-3 {
  margin: 17px 0 9px;
  color: #172033;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 800;
}
.proposal-doc .doc-heading-3::before {
  content: "▷ ";
  color: var(--doc-blue);
}
.proposal-doc .continued {
  color: #64748b;
  font-size: 15px;
  font-weight: 700;
}
.proposal-doc .doc-body {
  color: #202733;
  font-size: 20px;
  line-height: 1.78;
  letter-spacing: -.006em;
  text-align: justify;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.proposal-doc .doc-body p {
  margin: 0 0 12px;
  text-indent: 0;
}
.proposal-doc .doc-body strong {
  color: #0b3558;
  font-weight: 800;
}
.proposal-doc .dash-paragraph {
  position: relative;
  padding-left: 17px;
}
.proposal-doc .dash-paragraph::before {
  content: "-";
  position: absolute;
  left: 1px;
  top: 0;
  font-weight: 800;
}
.proposal-doc .doc-note {
  margin: 15px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--doc-blue);
  background: #f6f8fa;
  color: #263445;
  font-size: 16px;
  line-height: 1.6;
}
.proposal-doc .doc-figure {
  width: 100%;
  margin: 20px auto 18px;
  text-align: center;
}
.proposal-doc .doc-figure--wide { width: 100%; }
.proposal-doc .doc-figure--medium { width: 82%; }
.proposal-doc .doc-figure img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  border: 1px solid #cbd5e1;
  background: #fff;
}
.proposal-doc figcaption,
.proposal-doc .figure-caption {
  margin-top: 8px;
  color: #111827;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}
.proposal-doc .diagram {
  width: 100%;
  padding: 22px 24px;
  border: 1px solid #64748b;
  background: #fbfcfd;
}
.proposal-doc .diagram-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
  align-items: stretch;
}
.proposal-doc .diagram-flow--4 { grid-template-columns: repeat(4, 1fr); }
.proposal-doc .diagram-flow--3 { grid-template-columns: repeat(3, 1fr); }
.proposal-doc .diagram-node {
  position: relative;
  min-height: 155px;
  padding: 16px 13px;
  border: 1.5px solid #52748c;
  background: #fff;
  color: #263445;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}
.proposal-doc .diagram-node:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -22px;
  top: 50%;
  transform: translateY(-55%);
  color: var(--doc-red);
  font-size: 21px;
  font-weight: 900;
}
.proposal-doc .diagram-node b {
  display: block;
  margin-bottom: 7px;
  color: #0b3558;
  font-size: 17px;
  line-height: 1.35;
}
.proposal-doc .diagram-node em {
  display: block;
  margin-bottom: 5px;
  color: var(--doc-red);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.proposal-doc .diagram-band {
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid #88a7ba;
  background: #eaf3f7;
  color: #153d58;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
  font-weight: 700;
}
.proposal-doc .diagram-stack {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 16px;
  align-items: center;
}
.proposal-doc .diagram-column {
  display: grid;
  gap: 9px;
}
.proposal-doc .diagram-core {
  padding: 22px;
  border: 2px solid var(--doc-blue);
  background: #eef6fa;
  color: #123b57;
  font-size: 16px;
  line-height: 1.55;
  text-align: center;
  font-weight: 800;
}
.proposal-doc .doc-table-wrap {
  margin: 18px 0 17px;
}
.proposal-doc .doc-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border-top: 2px solid #294b65;
  border-bottom: 1px solid #64748b;
}
.proposal-doc .doc-table-wrap caption {
  caption-side: bottom;
  padding-top: 8px;
  color: #111827;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
}
.proposal-doc .doc-table-wrap th,
.proposal-doc .doc-table-wrap td {
  padding: 13px 12px;
  border-right: 1px solid #94a3b8;
  border-bottom: 1px solid #94a3b8;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.52;
  text-align: left;
  vertical-align: middle;
  word-break: keep-all;
}
.proposal-doc .doc-table-wrap tr > :last-child { border-right: 0; }
.proposal-doc .doc-table-wrap th {
  background: #e7edf2;
  color: #132f45;
  font-weight: 800;
  text-align: center;
}
.proposal-doc .doc-table-wrap .subhead {
  background: #f3f6f8;
  color: #173b55;
  font-weight: 800;
}
.proposal-doc .doc-table-wrap .center { text-align: center; }
.proposal-doc .doc-table-wrap .input-needed { color: #8a2028; font-weight: 800; }
.proposal-doc .page-number {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: #111827;
  font-size: 14px;
}
.proposal-doc .page-number::before { content: "- "; }
.proposal-doc .page-number::after { content: " -"; }

/* Ⅲ장 서술형 본문: 반복 카드 대신 연속 문단과 필요한 표·그림만 사용한다. */
.proposal-doc.narrative-page .paper__inner {
  padding: 66px 82px 70px;
}
.proposal-doc.narrative-page .paper__content {
  height: 1542px;
}
.proposal-doc.narrative-page .doc-header {
  margin-bottom: 15px;
}
.proposal-doc.narrative-page .doc-heading-1 {
  margin-bottom: 17px;
  font-size: 30px;
}
.proposal-doc.narrative-page .doc-heading-2 {
  margin: 0 0 16px;
  font-size: 25px;
}
.proposal-doc.narrative-page .doc-heading-3 {
  margin: 0 0 15px;
  font-size: 22px;
}
.proposal-doc.narrative-page .doc-body {
  color: #171d26;
  font-size: 23px;
  line-height: 2;
}
.proposal-doc.narrative-page .doc-body p {
  margin: 0 0 16px;
}
.proposal-doc.narrative-page .doc-body p + .doc-heading-3,
.proposal-doc.narrative-page .doc-table-wrap + .doc-heading-3,
.proposal-doc.narrative-page .doc-figure + .doc-heading-3 {
  margin-top: 20px;
}
.proposal-doc.narrative-page .doc-bridge {
  padding-top: 12px;
  border-top: 1px solid #aeb8c2;
  color: #263647;
}
.proposal-doc.narrative-page .doc-bridge strong {
  color: #0b3558;
}
.proposal-doc.narrative-page .doc-table-wrap {
  margin: 20px 0 18px;
}
.proposal-doc.narrative-page .doc-table-wrap th,
.proposal-doc.narrative-page .doc-table-wrap td {
  padding: 11px 11px;
  font-size: 18px;
  line-height: 1.55;
}
.proposal-doc.narrative-page .doc-figure {
  margin: 18px auto 17px;
}
.proposal-doc.narrative-page .doc-figure img {
  max-height: 470px;
  border: 0;
}

/* 62~100쪽 검토 반영: 문단 중심의 공공 연구개발 제안서 편집. */
.proposal-doc.reviewed-page .paper__inner {
  padding: 66px 82px 70px;
}
.proposal-doc.reviewed-page .paper__content {
  height: 1542px;
}
.proposal-doc.reviewed-page .doc-header {
  margin-bottom: 15px;
}
.proposal-doc.reviewed-page .doc-heading-1 {
  margin: 0 0 22px;
  font-size: 34px;
}
.proposal-doc.reviewed-page .doc-heading-2 {
  margin: 0 0 21px;
  font-size: 30px;
}
.proposal-doc.reviewed-page .doc-heading-3 {
  margin: 0 0 20px;
  font-size: 26px;
}
.proposal-doc.reviewed-page .doc-body {
  color: #171d26;
  font-size: 26px;
  line-height: 2.1;
}
.proposal-doc.reviewed-page .doc-body p {
  margin: 0 0 22px;
}
.proposal-doc.reviewed-page .doc-body p + .doc-heading-3,
.proposal-doc.reviewed-page .doc-table-wrap + .doc-heading-3,
.proposal-doc.reviewed-page .doc-figure + .doc-heading-3 {
  margin-top: 19px;
}
.proposal-doc.reviewed-page .doc-bridge {
  padding-top: 11px;
  border-top: 1px solid #aeb8c2;
  color: #263647;
}
.proposal-doc.reviewed-page .doc-table-wrap {
  margin: 18px 0 17px;
}
.proposal-doc.reviewed-page .doc-table-wrap th,
.proposal-doc.reviewed-page .doc-table-wrap td {
  padding: 10px 10px;
  font-size: 18px;
  line-height: 1.62;
}
.proposal-doc.reviewed-page .doc-figure {
  margin: 18px auto 17px;
}
.proposal-doc.reviewed-page .diagram {
  padding: 20px 22px;
}
.proposal-doc.reviewed-page .diagram-node {
  min-height: 132px;
  font-size: 18px;
  line-height: 1.65;
}
.proposal-doc.reviewed-page .diagram-node b { font-size: 20px; }
.proposal-doc .section-cover {
  height: 100%;
  padding: 170px 94px 100px;
  border-top: 10px solid var(--doc-blue);
  background: #fff;
}
.proposal-doc .section-cover__label {
  margin-bottom: 86px;
  color: #526274;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .04em;
}
.proposal-doc .section-cover h1 {
  margin: 0 0 24px;
  color: #102f47;
  font-size: 52px;
  line-height: 1.25;
  letter-spacing: -.035em;
}
.proposal-doc .section-cover__subtitle {
  width: 82%;
  margin: 0;
  color: #334155;
  font-size: 24px;
  line-height: 1.65;
}
.proposal-doc .section-cover__info {
  position: absolute;
  left: 94px;
  right: 94px;
  bottom: 155px;
  border-top: 2px solid #294b65;
  border-bottom: 1px solid #94a3b8;
}
.proposal-doc .section-cover__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 56px;
  border-bottom: 1px solid #cbd5e1;
  font-size: 17px;
  line-height: 1.45;
}
.proposal-doc .section-cover__row:last-child { border-bottom: 0; }
.proposal-doc .section-cover__row span,
.proposal-doc .section-cover__row strong { padding: 14px 18px; }
.proposal-doc .section-cover__row span { background: #f0f3f5; color: #334155; font-weight: 700; }
.proposal-doc .section-cover__row strong { color: #111827; }
.proposal-doc .org-chart {
  display: grid;
  gap: 18px;
  justify-items: center;
}
.proposal-doc .org-tier {
  display: flex;
  width: 100%;
  justify-content: center;
  gap: 24px;
}
.proposal-doc .org-box {
  min-width: 220px;
  padding: 12px 18px;
  border: 1.5px solid #52748c;
  background: #fff;
  color: #173b55;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}
.proposal-doc .org-box b { display: block; font-size: 16px; }
.proposal-doc .org-box--lead { border-width: 2px; border-color: #164e78; background: #eaf3f7; }
.proposal-doc .org-line { width: 2px; height: 22px; background: #64748b; }
.proposal-doc .evidence-key {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid #b8c4ce;
  color: #4b5d6d;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}
