:root {
  --blue: #4a96d4;
  --blue-deep: #1f5f9a;
  --blue-bar: #2f78b8;
  --blue-soft: #e8f3fb;
  --navy: #1c3f66;
  --ink: #243447;
  --muted: #5a6d82;
  --line: #c5d8ea;
  --warn: #c45c4a;
  --card: #ffffff;
  --shadow: 0 8px 24px rgba(31, 95, 154, 0.08);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f7fbfe 0%, #eef5fb 100%);
}
button, input, textarea, select { font: inherit; }
.app { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #1f5f9a, #3d86c4);
  color: #fff; padding: 24px 16px 36px; position: sticky; top: 0; height: 100vh; overflow: auto;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.logo {
  width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--blue-deep);
  display: grid; place-items: center; font-weight: 800; font-size: 12px; border: 3px solid #7ec8c4;
}
.brand h1 { margin: 0; font-size: 14px; line-height: 1.3; }
.brand p { margin: 2px 0 0; font-size: 11px; opacity: .85; }
.nav-group { margin: 16px 0 8px; font-size: 11px; letter-spacing: .08em; opacity: .75; }
.nav-btn {
  width: 100%; text-align: left; border: 0; background: transparent; color: #fff;
  padding: 8px 12px; border-radius: 10px; cursor: pointer; margin-bottom: 3px; font-size: 13px;
  white-space: normal; line-height: 1.35; word-break: keep-all;
}
.nav-btn:hover { background: rgba(255,255,255,.14); }
.nav-btn.active { background: rgba(255,255,255,.22); font-weight: 700; }
.progress-box { margin-top: 20px; background: rgba(255,255,255,.12); border-radius: 14px; padding: 14px; }
.progress-box strong { display: block; font-size: 13px; margin-bottom: 8px; }
.bar { height: 8px; background: rgba(255,255,255,.25); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: #fff; transition: width .3s; }
.main { padding: 24px 28px 72px; max-width: 1100px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 12px; color: var(--muted); font-size: 13px;
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 650; }
.btn-primary { background: var(--blue-bar); color: #fff; }
.btn-ghost { background: #fff; color: var(--blue-deep); border: 1px solid var(--line); }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.view { display: none; }
.view.active { display: block; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hero {
  background: #fff; border-radius: 8px; min-height: 480px; display: grid; place-items: center;
  position: relative; overflow: hidden; box-shadow: var(--shadow); border: 1px solid #e4eef6;
}
.diamond {
  width: min(390px, 82vw); aspect-ratio: 1; background: #5aa0dc; color: #fff;
  transform: rotate(45deg); border-radius: 18px; display: grid; place-items: center;
  box-shadow: 0 18px 40px rgba(74,150,212,.28); position: relative; z-index: 2;
}
.diamond-inner { transform: rotate(-45deg); text-align: center; padding: 16px; max-width: 90%; }
.diamond-inner small {
  display: inline-block; background: #fff; color: #2f78b8; border-radius: 999px;
  padding: 4px 12px; font-weight: 700; margin-bottom: 12px;
}
.diamond-inner h2 {
  margin: 0; font-size: clamp(22px, 3.6vw, 32px); line-height: 1.28; font-weight: 800;
  word-break: keep-all;
}
.section-title {
  background: #d8ebf8; color: #16324d; display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 18px 7px 8px; border-radius: 999px; font-weight: 800; margin: 6px 0 14px;
  border: 1px solid #b7d4ea; flex-wrap: wrap; word-break: keep-all;
}
.section-title .num {
  width: 28px; height: 28px; border-radius: 50%; background: #1f5f9a; color: #fff;
  display: grid; place-items: center; font-size: 14px; flex-shrink: 0;
}
.card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); margin-bottom: 14px; word-break: keep-all;
}
.subhead { color: #2f78b8; font-weight: 800; margin: 0 0 10px; font-size: 16px; word-break: keep-all; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 6px; word-break: keep-all; }
.field, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fff;
}
textarea { min-height: 86px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; color: var(--ink); }
.check label { margin: 0; line-height: 1.4; }
.footer-note { color: var(--muted); font-size: 12px; margin-top: 20px; text-align: center; }
.small { font-size: 13px; color: var(--muted); }
ul.compact { margin: 6px 0 0; padding-left: 18px; }
.link-chip {
  display: inline-flex; align-items: center; gap: 6px; margin: 6px 6px 0 0;
  padding: 8px 14px; border-radius: 999px; background: var(--blue-bar); color: #fff;
  text-decoration: none; font-size: 13px; font-weight: 700;
}
.link-chip.ghost { background: #fff; color: var(--blue-deep); border: 1px solid var(--line); }
.page-tag { display: inline-block; margin-left: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.lab-list { display: grid; gap: 10px; margin-top: 10px; }
.lab-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.lab-item b { display: block; font-size: 14px; color: var(--ink); line-height: 1.35; word-break: keep-all; }
.lab-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.lab-actions a {
  font-size: 12px; padding: 6px 10px; border-radius: 999px; text-decoration: none;
  font-weight: 700; white-space: nowrap;
}
.lab-actions .open, .lab-actions .run { background: var(--blue-bar); color: #fff; }
.lab-actions .dl { background: #fff; color: var(--blue-deep); border: 1px solid var(--line); }
.lab-actions .ans { background: #fffbeb; color: #b45309; border: 1px solid #fcd34d; }
.pill {
  display: inline-flex; font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: 999px; background: var(--blue-soft); color: var(--blue-deep); margin-bottom: 4px;
}
.pill.green { background: #e8f7ef; color: #2f9e6a; }
.pill.orange { background: #fff6e8; color: #c27a2c; }
@media print {
  .sidebar, .topbar, .actions { display: none !important; }
  .app { display: block; }
  .view { display: block !important; page-break-after: always; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: relative; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .lab-item { grid-template-columns: 1fr; }
  .lab-actions { justify-content: flex-start; }
}
