:root {
  font-family: "Pretendard", "Segoe UI", "Malgun Gothic", sans-serif;
  color: #202630;
  background: #f6f7f9;
  font-size: 15px;
  font-synthesis: none;
  --accent: #4358bd;
  --line: #e1e4ea;
  --muted: #626b7a;
  --paper: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button {
  border: 0;
  background: none;
}
a {
  color: var(--accent);
}
p {
  line-height: 1.7;
  margin: 10px 0;
  color: var(--muted);
}
h1 {
  font-size: 30px;
  letter-spacing: -1.1px;
  margin: 10px 0;
  font-weight: 720;
}
h2 {
  font-size: 21px;
  line-height: 1.5;
  letter-spacing: -0.5px;
  margin: 10px 0 14px;
}
h3 {
  font-size: 17px;
  line-height: 1.5;
}
small,
.meta,
.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.meta {
  display: block;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.7px;
}
.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  background: #fcfcfd;
  border-right: 1px solid var(--line);
  padding: 30px 20px;
  position: fixed;
  width: 220px;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.workspace-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  margin-bottom: 40px;
  padding: 0;
}
.app-symbol {
  background: #ebeefb;
  color: var(--accent);
  padding: 5px 9px;
  border-radius: 9px;
  font-size: 21px;
}
.project-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
select,
input,
textarea {
  background: #fff;
  border: 1px solid #cfd5df;
  border-radius: 8px;
  padding: 11px 12px;
  color: #252b35;
  max-width: 100%;
}
aside select {
  width: 100%;
  font-size: 14px;
}
nav {
  display: flex;
  gap: 8px;
}
aside nav {
  margin-top: 28px;
  flex-direction: column;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  border-radius: 8px;
  padding: 11px 17px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn.primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn.primary:hover {
  background: #3448a4;
}
.btn.secondary {
  border: 1px solid #cdd2dc;
  background: #fff;
}
.btn.secondary:hover {
  background: #f1f3f8;
}
.btn.small {
  font-size: 12px;
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 7px 12px;
}
.btn.primary.small {
  background: var(--accent);
  border-color: var(--accent);
}
.btn.primary.small:hover {
  background: #3448a4;
}
.btn.waiting::after {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.btn.text {
  color: var(--accent);
  padding: 7px 0;
  min-height: 35px;
}
.btn.nav {
  justify-content: flex-start;
  font-weight: 500;
  width: 100%;
  padding: 12px;
}
.btn.nav:hover {
  background: #f0f2f7;
}
.btn.nav.selected {
  background: #eaeefb;
  color: var(--accent);
  font-weight: 650;
}
.aside-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.aside-bottom p {
  font-size: 11px;
  padding: 0 12px;
  margin-top: 20px;
}
main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 72px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  color: var(--muted);
}
.page {
  max-width: 1140px;
  margin: auto;
  padding: 38px 46px 70px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 20px;
  gap: 18px;
}
.page-head.compact {
  margin-bottom: 22px;
}
.home-actions {
  display: flex;
  gap: 12px;
  margin: 25px 0 38px;
}
.empty-onboard {
  padding: 66px 30px;
  text-align: center;
  background: #fff;
  border: 1px dashed #d5dae3;
  border-radius: 16px;
}
.outline-icon {
  font-size: 34px;
  color: #a1a9b8;
}
.simple-flow {
  display: flex;
  justify-content: center;
  gap: 30px;
  list-style: none;
  counter-reset: steps;
  padding: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.simple-flow li {
  counter-increment: steps;
}
.simple-flow li:before {
  content: counter(steps);
  display: inline-flex;
  width: 22px;
  height: 22px;
  background: #eef0f5;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-right: 7px;
}
.work-list {
  display: grid;
  gap: 14px;
}
.work-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.work-row h2 {
  font-size: 19px;
  margin: 6px 0;
}
.work-row p {
  font-size: 13px;
  margin: 0;
  max-width: 560px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.work-row > .btn {
  flex-shrink: 0;
}
.detail {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 20px #20263003;
}
.steps {
  border-bottom: 1px solid var(--line);
  padding: 0 26px;
  gap: 8px;
}
.steps button {
  padding: 20px 7px;
  flex: 1;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.steps button.active {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
.steps button span {
  display: inline-flex;
  background: #f0f2f7;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  font-size: 11px;
}
.steps button.active span {
  background: #e9edff;
}
.detail-content {
  padding: 34px;
  min-height: 310px;
}
.actionbar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 18px 28px;
  background: #fffffff5;
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 -5px 12px #20263004;
}
.action-note {
  font-size: 12px;
  color: var(--muted);
}
.actions,
.result-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.actions select {
  font-size: 13px;
  padding: 10px;
  max-width: 155px;
}
.example-notice {
  font-size: 12px;
  border: 1px solid #d8def2;
  background: #eff2fc;
  color: #4c5881;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
}
.badge {
  font-size: 11px;
  display: inline-flex;
  border-radius: 5px;
  background: #f0f2f5;
  color: #576172;
  padding: 5px 9px;
  line-height: 1.25;
  font-weight: 650;
}
.badge.PASS {
  color: #237347;
  background: #e9f4ec;
}
.badge.FAIL {
  color: #a13737;
  background: #fbecec;
}
.badge.BLOCKED,
.badge.UNVERIFIED,
.badge.STALE {
  color: #795a28;
  background: #f8f0df;
}
.badge.READY,
.badge.DRAFT,
.badge.neutral {
  background: #edf0f8;
  color: #52607a;
}
.note,
.notice {
  padding: 17px 19px;
  background: #f5f6fa;
  border-radius: 8px;
  border: 1px solid #e6e9f0;
  margin: 20px 0;
  font-size: 13px;
  line-height: 1.8;
}
.note strong {
  font-size: 14px;
}
.error-box {
  padding: 20px;
  background: #fff4f0;
  border: 1px solid #f0d9d1;
  border-radius: 9px;
}
.error-box p {
  font-size: 13px;
}
.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}
.source-grid figure {
  margin: 0;
  padding: 16px;
  background: #f3f4f7;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: center;
}
.source-grid img {
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: 5px;
}
.source-grid figcaption {
  font-size: 12px;
  margin-top: 10px;
  color: var(--muted);
}
.summary-box {
  padding: 24px 0;
}
.summary-box h2 {
  font-size: 18px;
  font-weight: 550;
}
.finding {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
blockquote {
  border-left: 2px solid #d5dbe9;
  padding-left: 15px;
  color: #586270;
  font-size: 13px;
}
details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
summary {
  cursor: pointer;
  font-size: 13px;
  color: #515e77;
  font-weight: 600;
  line-height: 1.7;
}
details[open] > summary {
  margin-bottom: 17px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.6;
  background: #f5f6fa;
  padding: 17px;
  border-radius: 8px;
  max-height: 450px;
  overflow: auto;
}
fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 24px 0;
  margin: 15px 0;
}
legend {
  font-size: 16px;
  font-weight: 650;
  padding: 0 0 14px;
  width: 100%;
  float: left;
}
legend + * {
  clear: both;
}
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border: 1px solid #dee3ec;
  padding: 13px 16px;
  border-radius: 8px;
  margin: 9px 0;
  font-size: 14px;
  cursor: pointer;
}
.choice:has(input:checked) {
  border-color: var(--accent);
  background: #f1f3fc;
  color: #35479b;
}
.answer-choice { cursor: pointer; }
.answer-choice small { display: block; margin-top: 5px; color: var(--muted, #687386); font-size: 12px; }
.answer-choice strong { margin-right: 10px; }
.answer-choice:has(input:focus-visible) { outline: 2px solid #5756bd; outline-offset: 3px; }
.custom-answer { width: 100%; box-sizing: border-box; margin: 0 0 14px; resize: vertical; }
.choice input {
  accent-color: var(--accent);
  width: 17px;
  height: 17px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 20px 0;
  font-size: 13px;
  font-weight: 600;
}
.field textarea {
  min-height: 95px;
  resize: vertical;
}
.field input,
.field textarea {
  font-weight: 400;
  width: 100%;
}
.intent-context {
  padding: 16px 20px;
  background: #f6f7fa;
  border-radius: 9px;
  margin-bottom: 28px;
}
.intent-context p {
  font-size: 13px;
  margin: 7px 0;
}
.intent-context .btn {
  font-size: 12px;
}
.behavior-list {
  list-style: none;
  padding: 0;
  counter-reset: behaviors;
}
.behavior-list li {
  counter-increment: behaviors;
  border-bottom: 1px solid var(--line);
  padding: 20px 0 20px 38px;
  position: relative;
  line-height: 1.7;
  font-size: 15px;
}
.behavior-list li:before {
  content: counter(behaviors);
  position: absolute;
  left: 0;
  top: 22px;
  background: #edf0f8;
  color: #54617b;
  width: 23px;
  height: 23px;
  line-height: 23px;
  text-align: center;
  border-radius: 50%;
  font-size: 12px;
}
.behavior-list p {
  font-size: 14px;
  margin: 6px 0 0;
}
.result-title {
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.result-title h2 {
  font-size: 23px;
  margin: 15px 0 8px;
}
.result-title p {
  font-size: 11px;
}
.result-item {
  padding: 26px 0 12px;
  border-bottom: 1px solid var(--line);
}
.result-item h3 {
  display: inline;
  margin-left: 10px;
}
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.compare > div {
  padding: 18px;
  background: #f6f7fa;
  border-radius: 8px;
}
.compare span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}
.compare p {
  font-size: 14px;
  color: #303846;
}
.result-item details {
  border: 0;
  padding-bottom: 0;
}
.result-item details p {
  font-size: 12px;
}
.coverage {
  padding: 25px 0;
  display: flex;
  gap: 20px;
  font-size: 14px;
}
.result-actions {
  margin: 10px 0 25px;
}
.history-row {
  display: flex;
  gap: 20px;
  align-items: center;
  width: 100%;
  background: #fff;
  padding: 24px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.history-row span:last-child {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}
.running,
.empty {
  padding: 55px 20px;
  text-align: center;
}
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #d7ddef;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  vertical-align: middle;
}
.spinner.large {
  width: 28px;
  height: 28px;
  margin-bottom: 20px;
}
.running p {
  font-size: 13px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  width: min(600px, calc(100% - 30px));
  max-height: 88vh;
  color: inherit;
  box-shadow: 0 20px 80px #171e3d33;
}
dialog::backdrop {
  background: #20263066;
  backdrop-filter: blur(2px);
}
.modal-head {
  position: sticky;
  top: 0;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.modal-head h2 {
  font-size: 18px;
  margin: 0;
}
.btn.icon {
  font-size: 25px;
  padding: 0;
  min-width: 30px;
  min-height: 30px;
  color: var(--muted);
}
.modal-body {
  padding: 25px;
}
.modal-body > p {
  font-size: 14px;
}
.connection {
  margin-bottom: 24px;
}
.connection small {
  display: block;
  margin: 8px 0;
}
.import-steps {
  font-size: 13px;
  line-height: 2.2;
  padding-left: 22px;
}
.copy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f3f5fa;
  border-radius: 8px;
}
.copy-row code {
  font-size: 11px;
  overflow-wrap: anywhere;
  flex: 1;
  min-width: 0;
}
.file-drop {
  display: block;
  background: #f6f7fa;
  padding: 20px;
  border: 1px dashed #c7cedd;
  border-radius: 8px;
  margin: 20px 0;
  font-size: 13px;
}
.file-drop input {
  margin-top: 10px;
  border: 0;
  padding: 0;
  width: 100%;
  font-size: 12px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 25px 0;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: #252c3c;
  color: white;
  padding: 14px 22px;
  border-radius: 9px;
  font-size: 13px;
  max-width: 90vw;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 100;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.loading {
  padding: 80px;
  text-align: center;
}
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  aside {
    width: 185px;
    padding: 24px 14px;
  }
  .page {
    padding: 30px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .action-note {
    display: none;
  }
  .actionbar {
    justify-content: flex-end;
  }
  .steps {
    padding: 0 14px;
    gap: 3px;
  }
  .steps button {
    font-size: 12px;
  }
  .steps button span {
    margin-right: 4px;
  }
  .work-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
}
@media (max-width: 650px) {
  .layout {
    display: block;
  }
  aside {
    position: static;
    width: 100%;
    height: auto;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .workspace-title {
    font-size: 15px;
    margin: 0;
  }
  .app-symbol {
    font-size: 17px;
    padding: 4px 8px;
  }
  .project-label {
    display: none;
  }
  aside select {
    font-size: 12px;
  }
  aside nav {
    grid-column: 1/-1;
    flex-direction: row;
    margin: 0;
    gap: 10px;
  }
  aside nav .btn {
    padding: 8px 12px;
    min-height: 33px;
    width: auto;
    font-size: 12px;
  }
  .aside-bottom {
    display: none;
  }
  .topbar {
    padding: 0 20px;
    height: 54px;
  }
  .page {
    padding: 24px 16px 35px;
  }
  h1 {
    font-size: 25px;
  }
  .page-head {
    margin-bottom: 12px;
  }
  .page-head p {
    font-size: 13px;
  }
  .home-actions {
    gap: 8px;
    margin: 22px 0;
  }
  .home-actions .btn {
    font-size: 12px;
    padding: 12px;
  }
  .empty-onboard {
    padding: 45px 12px;
  }
  .simple-flow {
    gap: 8px;
    font-size: 11px;
  }
  .simple-flow li:before {
    width: 18px;
    height: 18px;
    margin-right: 3px;
  }
  .work-row {
    padding: 20px;
  }
  .detail-content {
    padding: 22px 18px;
  }
  .steps {
    gap: 0;
    padding: 0 6px;
  }
  .steps button {
    font-size: 11px;
    padding: 15px 2px;
  }
  .steps button span {
    display: block;
    margin: 0 auto 6px;
  }
  .actionbar {
    padding: 14px 12px;
    bottom: 0;
  }
  .actions {
    gap: 9px;
    width: 100%;
    justify-content: flex-end;
  }
  .actionbar .btn {
    padding: 11px 12px;
    font-size: 12px;
  }
  .actionbar .actions select {
    max-width: 118px;
    font-size: 11px;
  }
  .compare {
    gap: 9px;
  }
  .compare > div {
    padding: 13px;
  }
  .result-title h2 {
    font-size: 20px;
  }
  .result-item h3 {
    font-size: 14px;
  }
  .result-actions .btn {
    font-size: 12px;
    white-space: normal;
  }
  .history-row {
    flex-wrap: wrap;
    padding: 18px;
    gap: 12px;
  }
  .history-row span:last-child {
    margin: 0;
    width: 100%;
  }
  .example-notice {
    font-size: 11px;
  }
  .modal-body {
    padding: 20px;
  }
  .source-grid {
    grid-template-columns: 1fr;
  }
  .btn.small {
    font-size: 11px;
  }
  .intent-context {
    padding: 14px;
  }
  .intent-context p {
    font-size: 12px;
  }
  legend {
    font-size: 15px;
  }
  .choice {
    font-size: 13px;
  }
  .result-actions {
    gap: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition: none !important;
  }
}

[hidden] {
  display: none !important;
}

.work-title {
  padding: 0;
  text-align: left;
  font: inherit;
}
.work-title:hover {
  text-decoration: underline;
}

.library-grid { display: grid; gap: 12px; margin: 16px 0; }
.library-card { border: 1px solid #e2e4e9; border-radius: 12px; padding: 16px; }
.library-card label { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.library-card input[type=checkbox] { width: 18px; height: 18px; }
.library-preview img { display: block; width: 100%; max-height: 420px; object-fit: contain; margin-top: 12px; }

.notion-status { display:flex; gap:16px; align-items:center; justify-content:space-between; flex-wrap:wrap; padding:14px 20px; margin:0 0 20px; background:#fff; border:1px solid #e2e4e9; border-radius:12px; color:#53617a; }

.team-status{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline;padding:10px 14px;margin:0 0 14px;border:1px solid var(--line,#d8d8d8);border-radius:8px}
.team-status.approved{border-color:#2f8f5b}
.team-status strong{white-space:nowrap}
.screen-findings{margin:8px 0 0;padding:0 0 0 18px;font-size:.9em;text-align:left}
.screen-findings li{margin:4px 0}
.provider{padding:10px 12px;margin:8px 0;border:1px solid var(--line,#d8d8d8);border-radius:8px}
.provider.active{border-color:#2f8f5b}
.provider .btn + .btn{margin-left:8px}
.provider-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.provider-head strong{margin-right:auto}
details.setting{border:1px solid var(--line);border-radius:10px;padding:0 14px;margin:10px 0}
details.setting[open]{padding-bottom:14px}
details.setting>summary{display:flex;align-items:center;gap:10px;padding:13px 0;margin:0;list-style:none}
details.setting>summary::-webkit-details-marker{display:none}
details.setting>summary::before{content:"▸";color:#8a93a6}
details.setting[open]>summary::before{content:"▾"}
details.setting>summary strong{margin-right:auto;font-size:15px}
.key-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px}
.key-form .field{flex:1 1 200px;margin:0}
.team-policy.conflict{border-left:3px solid #c0392b;padding-left:12px}
.small-link{font-size:.85em;font-weight:400}
.device-code{font-size:1.3em;letter-spacing:.08em;padding:4px 10px;border:1px dashed var(--line);border-radius:6px}
.documents{margin:0 0 14px;padding:10px 14px;border:1px solid var(--line);border-radius:8px}
.documents h3{margin:0 0 6px;font-size:1em}
.documents .document p{margin:4px 0}
