:root{font-family:Inter,"Noto Sans KR",system-ui,sans-serif;color:#18203d;background:#f5f6fa}*{box-sizing:border-box}body{margin:0}main{max-width:1200px;margin:auto;padding:28px}header,.toolbar{display:flex;align-items:center;gap:20px;flex-wrap:wrap}header{padding:12px 0 28px;border-bottom:1px solid #dce0eb}.brand{font-size:26px;font-weight:900;color:#22204e;text-decoration:none;letter-spacing:2px}header button{margin-left:auto}h1{font-size:38px;letter-spacing:-1.5px}h2{font-size:21px}p{line-height:1.8}#status{padding:16px 20px;background:#e9e5fc;border-radius:12px;white-space:pre-wrap}button{padding:12px 18px;border:1px solid #cbd0df;border-radius:9px;background:white;color:#22204e;font:inherit;cursor:pointer}button:hover{border-color:#7360cf}button:disabled{opacity:.55;cursor:default}input,textarea,select{display:block;width:100%;padding:12px;margin:8px 0 20px;border:1px solid #cbd0df;border-radius:8px;font:inherit;background:white;color:inherit}textarea{min-height:100px;resize:vertical}label{display:block;font-size:14px;font-weight:650}#login{max-width:600px;margin:60px auto}.toolbar{margin:24px 0}.toolbar label{min-width:280px}.toolbar select{margin-bottom:0}.columns{display:grid;grid-template-columns:280px 1fr;gap:28px}.columns>nav,.columns>section{background:white;border:1px solid #dce0eb;border-radius:16px;padding:24px}#studies button{display:block;text-align:left;width:100%;margin-bottom:10px;overflow-wrap:anywhere}fieldset{border:0;padding:0;margin:0}#save,#email-form button,#code-form button{background:#6752bc;color:white;border:0}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f4f1fe;padding:16px;border-radius:10px}#conflict{border:1px solid #c4b6f4;border-radius:12px;padding:20px;margin-top:20px}[hidden]{display:none!important}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #8c79dc;outline-offset:3px}@media(max-width:720px){main{padding:18px}.columns{grid-template-columns:1fr}h1{font-size:30px}.toolbar label{min-width:0;width:100%}.columns>nav,.columns>section{padding:18px}}

.notice{padding:14px 18px;margin:20px 0;border:1px solid #d8cffa;border-radius:12px;background:#f6f3ff;color:#343050;font-size:14px;line-height:1.8}.notice--caution{border-color:#ead3a0;background:#fffaf0;color:#4f3c23}.legal-links{display:flex;flex-wrap:wrap;gap:10px 20px;align-items:center;border-top:1px solid #dce0eb;padding:24px 0;margin-top:44px;font-size:13px;line-height:1.7;color:#596079}.legal-links a{color:#4e3c95;text-decoration:underline;text-underline-offset:3px}@media(max-width:720px){.legal-links{display:grid;gap:8px}}

:is(#saved-mock,#customer-reports) { margin: 0 0 22px; padding: 16px 18px; border: 1px solid #d8cffa; border-radius: 12px; overflow-wrap: anywhere; }
:is(#saved-mock,#customer-reports) summary { cursor: pointer; font-weight: 700; color: #4e3c95; }
:is(#saved-mock,#customer-reports) :is(p,li) { font-size: 14px; line-height: 1.65; }
#customer-reports-refresh { margin-top: 12px; }
#customer-reports-list:empty, #customer-reports-status:empty { display: none; }
#customer-reports-list { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; }
.saved-mock-lookup { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.saved-mock-lookup input { flex: 1 1 18rem; min-width: 0; margin: 0; }
#saved-mock-content ol { padding-inline-start: 1.7rem; }
#saved-mock-content ol > li { padding: 12px 0; border-top: 1px solid #e4e2ee; }
#saved-mock-content h4, #saved-mock-content li p { margin: 3px 0; }
#saved-mock-content ul { padding-inline-start: 1.3rem; }
#saved-mock-content pre { max-height: 24rem; overflow: auto; font-size: 13px; }
#saved-mock-status:empty { margin: 0; }
#saved-mock-history { list-style: none; margin: 0; padding: 0; max-height: 16rem; overflow: auto; }
#saved-mock-history button { width: 100%; text-align: start; overflow-wrap: anywhere; margin-bottom: 4px; }
#saved-mock-history button:focus-visible { outline-offset: -3px; }
#saved-mock-form { margin-top: 1rem; }

/* Commercial customer portal. Existing research, auth and feature states remain untouched. */
header.portal-header {
  --portal-mint: #a1e6ce;
  min-height: 66px;
  padding: 10px clamp(16px, 3vw, 32px);
  gap: 12px 20px;
  border: 1px solid #332b46;
  border-radius: 16px;
  background: linear-gradient(120deg, #19192e, #2c233d);
  box-shadow: 0 8px 24px #22172e16;
}
header.portal-header .brand { color: #fff; font-size: clamp(20px, 3vw, 25px); }
header.portal-header .portal-header-label {
  padding-inline-start: 14px;
  border-inline-start: 1px solid #635970;
  color: #e1daeb;
  font-size: 13px;
  font-weight: 650;
}
header.portal-header #logout {
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #81748f;
  border-radius: 9px;
  background: #ffffff0a;
  color: #f8f5fb;
  font-size: 13px;
}
header.portal-header #logout:hover { border-color: var(--portal-mint); color: var(--portal-mint); }
header.portal-header :is(.brand, #logout):focus-visible { outline: 3px solid var(--portal-mint); outline-offset: 3px; }

#login.portal-login-card {
  width: min(100%, 480px);
  margin: clamp(26px, 6.5vw, 78px) auto clamp(30px, 6.5vw, 72px);
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid #e2dce9;
  border-top: 3px solid #477a6b;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 46px #25182f12;
}
.portal-kicker {
  margin: 0 0 12px;
  color: #2f6759;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: .075em;
}
.portal-login-card h1 {
  margin: 0 0 12px;
  color: #241d35;
  font-size: clamp(25px, 5vw, 36px);
  line-height: 1.22;
  letter-spacing: -.045em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.portal-login-lead {
  margin: 0 0 26px;
  color: #554d65;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.portal-login-card label { color: #342b45; }
.portal-login-card input {
  min-width: 0;
  min-height: 48px;
  margin: 7px 0 14px;
  border-color: #81758c;
  border-radius: 10px;
  font-size: 16px;
}
.portal-login-card :is(#email-form, #code-form) button {
  min-height: 48px;
  width: 100%;
  border: 1px solid #352642;
  border-radius: 10px;
  background: #352642;
  color: #fff;
  font-weight: 750;
}
.portal-login-card :is(#email-form, #code-form) button:hover:not(:disabled) { background: #50365d; }
.portal-login-card :is(input, button, a):focus-visible,
.portal-footer a:focus-visible,
#synthetic-approved-report :is(summary, input, button):focus-visible {
  outline: 3px solid #277464;
  outline-offset: 3px;
}
.portal-login-help, .portal-help {
  color: #554d65;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.portal-login-help { margin: 20px 0 0; }
.portal-login-help a, .portal-help a { color: #3f305c; text-underline-offset: 3px; }
#status.portal-status {
  margin: 12px 0 0;
  padding: 8px 13px;
  border: 1px solid #caddd6;
  border-radius: 9px;
  background: #eef8f4;
  color: #28564d;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
#status.portal-status:empty { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; clip-path: inset(50%); }
.legal-links.portal-footer {
  margin-top: 28px;
  padding: 14px 0;
  gap: 5px 18px;
  border-color: #e2dce9;
  color: #554d65;
  font-size: 12px;
}
.legal-links.portal-footer a { display: inline-flex; align-items: center; min-height: 28px; color: #47375b; }

.portal-workspace-intro { margin: 24px 0 12px; color: #302640; }
.portal-workspace-intro :is(h1, h2) { margin: 0 0 6px; }
.portal-workspace-intro p { margin: 0; color: #554d65; }
.portal-edit-guidance {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #ddd5e7;
  border-radius: 10px;
  background: #f8f6fb;
  color: #4d405b;
  font-size: 13px;
  line-height: 1.65;
}
#studies button[aria-current]:not([aria-current="false"]) {
  min-height: 44px;
  border-color: #578376;
  background: #eaf5f0;
  color: #234a41;
  box-shadow: inset 3px 0 #377566;
  font-weight: 800;
}

#synthetic-approved-report {
  min-width: 0;
  margin: 0 0 22px;
  padding: 4px clamp(12px, 3vw, 18px) 8px;
  overflow-wrap: anywhere;
  border: 1px solid #b5d2c6;
  border-inline-start: 4px solid #457e6b;
  border-radius: 13px;
  background: #f3faf7;
  color: #243d36;
}
#synthetic-approved-report > summary {
  min-height: 44px;
  padding: 10px 0;
  border-radius: 4px;
  color: #23493f;
  font-weight: 780;
  line-height: 1.45;
  cursor: pointer;
}
#synthetic-approved-report > summary::marker { color: #386e5e; }
#synthetic-approved-report > p { margin: 2px 0 12px; font-size: 14px; }
#synthetic-approved-report-status:empty, #synthetic-approved-report-content:empty { display: none; }
#synthetic-approved-report-form input { min-height: 44px; margin-bottom: 10px; font-size: 16px; }
#synthetic-approved-report-form button { min-height: 44px; color: #244c41; font-weight: 750; }
#synthetic-approved-report-content:not(:empty) {
  margin-top: 12px;
  padding: clamp(12px, 3vw, 18px);
  border: 1px solid #d5e5de;
  border-radius: 10px;
  background: #fff;
}
#synthetic-approved-report-content h3 { margin: 0 0 10px; color: #29344a; }
#synthetic-approved-report-content h4 { margin: 14px 0 3px; padding-top: 12px; border-top: 1px solid #e0e9e4; }
#synthetic-approved-report-content p { margin: 4px 0; font-size: 14px; }
.portal-report-metrics {
  padding: 8px 10px;
  border-radius: 7px;
  background: #eaf5ef;
  color: #2d554a;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 540px) {
  header.portal-header { gap: 8px 11px; border-radius: 12px; }
  header.portal-header .portal-header-label { padding-inline-start: 10px; }
  #login.portal-login-card { margin-top: 26px; border-radius: 16px; }
  .legal-links.portal-footer { gap: 4px; }
  #synthetic-approved-report-form button { width: 100%; }
}

.portal-login-card .portal-login-lead,
.portal-login-card .portal-login-help,
.portal-footer { word-break: keep-all; overflow-wrap: anywhere; }
