* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  --content-line-height: 1.62;
  --document-line-height: 1.72;
  --section-flow-gap: 22px;
  font-family: 'Malgun Gothic', sans-serif;
  background: linear-gradient(180deg, #f4f7fb 0%, #edf2f7 100%);
  color: #243447;
  line-height: var(--content-line-height);
}
a { color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 26px 24px 34px; }
.page-shell { padding-top: 30px; padding-bottom: 42px; }
h1, h2 { color: #1f2d3d; }
h2 { margin-bottom: 16px; font-size: 24px; line-height: 1.36; }
.header {
  background: #1f3c5b;
  color: white;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 10px 24px rgba(20, 35, 50, 0.16);
}
.header h1 { color: white; margin: 0; font-size: 20px; }
.header-actions { display: flex; gap: 18px; align-items: center; }
.header-actions a { color: #eef5fb; text-decoration: none; font-size: 14px; }
.header-user { color: #cfe0f2; font-size: 14px; }
.nav-group {
  position: relative;
  color: #eef5fb;
  font-size: 14px;
}
.nav-trigger {
  appearance: none;
  background: transparent;
  border: 0;
  color: #eef5fb;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 0;
}
.nav-trigger::after {
  content: "⌄";
  margin-left: 5px;
  font-size: 11px;
  color: #cfe0f2;
}
.nav-trigger:focus { outline: none; }
.nav-trigger:focus-visible {
  outline: 2px solid #cfe0f2;
  outline-offset: 4px;
  border-radius: 4px;
}
.nav-panel {
  position: absolute;
  top: 28px;
  right: 0;
  min-width: 170px;
  display: none;
  gap: 2px;
  background: #ffffff;
  border: 1px solid #d9e6f2;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 18px 38px rgba(20, 35, 50, 0.18);
  z-index: 120;
}
.nav-group:hover .nav-panel,
.nav-group:focus-within .nav-panel,
.nav-group.is-open .nav-panel {
  display: grid;
}
.nav-group.is-open .nav-trigger {
  color: #ffffff;
}
.header-actions .nav-panel a {
  color: #27486c;
  padding: 8px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.header-actions .nav-panel a:hover { background: #edf5ff; }
.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
  border: 1px solid #d9e6f2;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: var(--section-flow-gap);
  box-shadow: 0 14px 28px rgba(31, 60, 91, 0.08);
}
.eyebrow { color: #5e7ea1; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.hero-copy { color: #60758f; max-width: 560px; line-height: 1.6; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: var(--section-flow-gap);
}
.summary-card {
  background: white;
  border-radius: 16px;
  border: 1px solid #dfe8f0;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(31, 60, 91, 0.06);
}
.summary-card span { display: block; color: #67809d; font-size: 13px; margin-bottom: 10px; }
.summary-card strong { font-size: 32px; color: #1f2d3d; }
.card {
  background: white;
  border-radius: 18px;
  padding: 24px 24px 26px;
  margin-bottom: var(--section-flow-gap);
  border: 1px solid #dfe8f0;
  box-shadow: 0 12px 26px rgba(31, 60, 91, 0.06);
}
.card > h2,
.card > .mini-title {
  margin-bottom: 14px;
  line-height: 1.36;
}
.card > p,
.card .helper-text {
  line-height: var(--content-line-height);
}
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.form-row + .toolbar,
.form-group + .toolbar {
  margin-top: 6px;
}
.stack-list + .toolbar {
  margin-top: 22px;
}
.stack-list + .form-row {
  margin-top: 26px;
}
.stack-list + .mini-title {
  margin-top: 24px;
}
.toolbar-spread { justify-content: space-between; }
.toolbar-group { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.assessment-flow-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.assessment-flow-step {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #d7e3ef;
  border-radius: 10px;
  background: #f8fbff;
  color: #27486c;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(31, 60, 91, 0.05);
}
.assessment-flow-step:hover,
.assessment-flow-step:focus-visible {
  border-color: #2c7be5;
  background: #eef6ff;
  outline: none;
}
.flow-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2c7be5;
  box-shadow: 0 0 0 4px rgba(44, 123, 229, 0.12);
  flex: 0 0 auto;
}
.assessment-flow-arrow {
  color: #8aa1b8;
  font-weight: 900;
}
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c9d7e5;
  border-radius: 10px;
  font-size: 14px;
  background: #fbfdff;
  line-height: 1.45;
}
.fixed-field {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #d9e6f2;
  border-radius: 10px;
  background: #f5f9fd;
  color: #27486c;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #2c7be5;
  box-shadow: 0 0 0 4px rgba(44, 123, 229, 0.12);
}
.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}
.btn-primary { background: #2c7be5; color: white; }
.btn-primary:hover { background: #1f68c1; }
.btn-success { background: #1f9d6d; color: white; }
.btn-success:hover { background: #157552; }
.btn-sm { padding: 7px 12px; font-size: 12px; }
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 16px;
  overflow: hidden;
}
th {
  background: #24486d;
  color: white;
  padding: 14px 12px;
  text-align: left;
  font-size: 13px;
}
td {
  padding: 13px 12px;
  border-bottom: 1px solid #ebf0f6;
  font-size: 14px;
}
tr:hover { background: #f7fbff; }
.table-empty { text-align: center; padding: 36px 12px; color: #8094aa; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.badge-stage { background: #e8f1fd; color: #1e63b7; }
.badge-result { background: #e9f9ef; color: #18794e; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 10px; font-weight: 700; font-size: 13px; color: #40566f; line-height: 1.35; }
.form-row { display: flex; gap: 18px; align-items: flex-start; }
.form-row .form-group { flex: 1; }
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 35, 50, 0.52);
  z-index: 100;
  justify-content: center;
  align-items: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: white;
  border-radius: 18px;
  padding: 28px;
  width: 560px;
  max-height: 84vh;
  overflow-y: auto;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.18);
}
.modal-wide { width: 720px; }
.modal-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.report-body-rendered {
  max-height: 520px;
  overflow: auto;
  border: 1px solid #e3ebf3;
  border-radius: 12px;
  background: #eef4f9;
  padding: 16px;
  font-size: 13px;
  line-height: var(--document-line-height);
}
.report-body-section,
.report-brief-section {
  background: #fff;
  border: 1px solid #dbe7f2;
  border-radius: 10px;
  padding: 18px 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(31, 60, 91, 0.06);
}
.report-body-section:last-child,
.report-brief-section:last-child {
  margin-bottom: 0;
}
.report-document-title {
  background: #fff;
  border: 1px solid #dbe7f2;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(31, 60, 91, 0.06);
}
.report-document-title p {
  margin: 0 0 4px;
  color: #668098;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.report-document-title h3 {
  margin: 0;
  color: #13293d;
  font-size: 18px;
  line-height: 1.45;
}
.report-render-title {
  font-size: 17px;
  margin: 0 0 12px;
  color: #13293d;
  padding-bottom: 8px;
  border-bottom: 1px solid #e4edf5;
}
.report-render-subtitle {
  font-size: 14px;
  margin: 12px 0 6px;
  color: #36506b;
}
.report-render-label {
  color: #1d3557;
  font-weight: 800;
}
.report-render-paragraph {
  margin: 7px 0;
  line-height: var(--document-line-height);
  color: #243b53;
  white-space: normal;
  overflow-wrap: anywhere;
}
.report-render-list {
  margin: 8px 0 12px 20px;
  padding: 0;
}
.report-render-item {
  margin: 4px 0;
  line-height: 1.68;
  color: #243b53;
  overflow-wrap: anywhere;
}
.report-render-item.sub {
  list-style-type: circle;
  margin-left: 18px;
}

.result-page {
  max-width: 1040px;
}
.result-document-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.result-document-head h2 {
  margin: 4px 0 6px;
  color: #1d3557;
}
.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #3a6ea5;
  text-transform: uppercase;
}
.result-document {
  background: #fff;
  border: 1px solid #dce8f3;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 10px 28px rgba(40, 70, 100, 0.08);
}
.insight-report {
  --report-indent: 0px;
  --report-section-gap: 20px;
  --report-list-marker-space: 18px;
  width: 100%;
}
.insight-report,
.insight-report * {
  box-sizing: border-box;
}
.insight-report h2 {
  width: calc(100% - var(--report-indent));
  margin: 4px 0 16px var(--report-indent);
  color: #13293d;
  font-size: 24px;
  line-height: 1.45;
}
.expert-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid #b9d3ec;
  border-radius: 999px;
  background: #edf6ff;
  color: #1d5b91;
  font-size: 12px;
  font-weight: 800;
}
.insight-report > .expert-badge {
  margin-left: var(--report-indent);
}
.insight-report section {
  width: 100%;
  padding: var(--report-section-gap) 0;
  border-top: 1px solid #e3ebf3;
  clear: both;
}
.insight-report h3 {
  width: calc(100% - var(--report-indent));
  margin: 0 0 12px var(--report-indent);
  font-size: 18px;
  color: #1d3557;
  line-height: 1.45;
}
.insight-report h4 {
  width: calc(100% - var(--report-indent));
  margin: 12px 0 8px var(--report-indent);
  font-size: 15px;
  color: #36506b;
  line-height: 1.45;
}
.insight-report p,
.insight-report li {
  line-height: var(--document-line-height);
  color: #243b53;
  overflow-wrap: anywhere;
}
.insight-report p {
  width: calc(100% - var(--report-indent));
  margin-left: var(--report-indent);
  margin-top: 7px;
  margin-bottom: 7px;
}
.insight-report ul,
.insight-report ol {
  width: calc(100% - var(--report-indent) - var(--report-list-marker-space));
  margin: 10px 0 12px calc(var(--report-indent) + var(--report-list-marker-space));
  padding-left: 18px;
  list-style-position: outside;
}
.insight-report li {
  padding-left: 2px;
  margin: 4px 0;
}
.insight-callout,
.letter-box {
  display: block;
  width: calc(100% - var(--report-indent));
  margin: 12px 0 0 var(--report-indent);
  border: 1px solid #dce8f3;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px 14px;
}
.letter-box {
  font-size: 14px;
  color: #1f3447;
}
.result-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 18px;
  width: calc(100% - var(--report-indent));
  margin: 12px 0 4px var(--report-indent);
  color: #50657a;
  font-size: 13px;
}
.result-table {
  width: calc(100% - var(--report-indent));
  border-collapse: collapse;
  margin: 10px 0 0 var(--report-indent);
  table-layout: fixed;
  overflow: hidden;
  border-radius: 8px;
}
.result-table th,
.result-table td {
  border: 1px solid #dce8f3;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.result-table th {
  background: #f2f7fb;
  color: #1d3557;
}
.result-factor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  width: calc(100% - var(--report-indent));
  margin-left: var(--report-indent);
}
.result-factor-card {
  border: 1px solid #dce8f3;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}
.result-factor-card strong {
  display: block;
  margin-bottom: 6px;
  color: #1d3557;
}
.result-factor-card span {
  display: block;
  font-size: 13px;
  color: #50657a;
}
@media print {
  .header,
  .result-document-head .toolbar {
    display: none;
  }
  body {
    background: #fff;
  }
  .result-document {
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .insight-report section,
  .result-factor-card {
    break-inside: avoid;
  }
}
.report-brief-preview {
  border: 1px solid #d8e4f1;
  border-radius: 12px;
  background: linear-gradient(180deg, #fcfeff 0%, #f6fbff 100%);
  padding: 16px;
  max-height: 280px;
  overflow: auto;
  line-height: var(--document-line-height);
}
.report-brief-preview h3 {
  font-size: 17px;
  margin: 10px 0 8px;
  color: #1d3557;
}
.report-brief-preview h4 {
  font-size: 14px;
  margin: 10px 0 5px;
  color: #36506b;
}
.report-brief-preview p {
  margin: 7px 0;
  color: #2e4458;
}
.report-brief-preview ul {
  margin: 8px 0 12px 20px;
}
.report-brief-preview li {
  margin: 4px 0;
}
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 12px 18px;
  border-radius: 12px;
  color: white;
  z-index: 200;
  display: none;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
}
.toast-success { background: #1f9d6d; }
.toast-error { background: #d64545; }
.page-back { margin-bottom: 16px; }
.page-back a { color: #2c7be5; text-decoration: none; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--section-flow-gap);
}
.detail-columns {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--section-flow-gap);
}
.stack-list { margin-top: 20px; display: grid; gap: 14px; }
.list-item {
  border: 1px solid #e3ebf3;
  border-radius: 12px;
  padding: 16px;
  background: #fbfdff;
  min-width: 0;
}
.list-item strong { display: block; color: #27486c; margin-bottom: 7px; line-height: 1.45; }
.list-item span { display: block; margin-top: 7px; line-height: 1.65; color: #40566f; }
.list-item strong,
.list-item span,
.list-item p,
.list-item li,
.list-item a {
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.list-item ul {
  margin: 10px 0 0 20px;
  padding: 0;
}
.list-item li {
  margin: 5px 0;
  line-height: 1.65;
}
.stack-list > * {
  min-width: 0;
}
.card,
.detail-grid,
.detail-columns,
#employeeBigFiveResultView,
#employeeEnneagramView,
#assessmentReportList,
#assessmentInviteLinks,
#employeeOnboardingList,
#employeeCounselingList,
#employeeResignationView {
  min-width: 0;
}
.result-card {
  width: 100%;
  overflow: hidden;
}
.result-card ul,
.result-card li,
.result-card span,
.result-card strong {
  max-width: 100%;
}
.result-card ul {
  list-style-position: outside;
  padding-right: 4px;
}
.result-card li {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.mini-title { margin-bottom: 14px; font-size: 16px; line-height: 1.4; }
.summary-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.summary-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.helper-text { color: #6d8198; font-size: 13px; margin-top: 12px; }
.helper-text + .stack-list,
.helper-text + .form-row,
.mini-title + .stack-list {
  margin-top: 18px;
}
.field-hint {
  display: block;
  margin-top: 6px;
  color: #6d8198;
  font-size: 12px;
  line-height: 1.5;
}
.integration-notice {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid #d9e6f2;
  background: #f8fbff;
  color: #56718d;
}
.integration-notice.warning {
  border-color: #f2c777;
  background: #fff8e6;
  color: #8a5a00;
}
.integration-notice.ok {
  border-color: #a8d9c4;
  background: #f0fbf6;
  color: #176448;
}
.integration-notice:empty {
  display: none;
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}
.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.link-row-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #56718d;
}
.status-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9fb3c8;
}
.status-dot.ok::before { background: #1f9d6d; }
.status-dot.muted::before { background: #c5d2de; }
.link-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f2f7fd;
  border: 1px solid #d9e6f2;
  color: #27486c;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-all;
}
.stage-lock-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fbff;
  border: 1px solid #d9e6f2;
  color: #56718d;
  font-size: 13px;
}
@media (max-width: 900px) {
  .summary-grid, .detail-grid, .detail-columns { grid-template-columns: 1fr; }
  .hero-card, .header { flex-direction: column; align-items: flex-start; }
  .header-actions { width: 100%; flex-wrap: wrap; }
  .form-row { flex-direction: column; gap: 0; }
}
