:root {
  --ink: #191a32;
  --muted: #575870;
  --line: #dedfeb;
  --violet: #5842c7;
  --violet-dark: #42319d;
  --lavender: #f1eeff;
  --rail-width: 90px;
  --gutter: clamp(24px, 4.5vw, 84px);
  color: var(--ink);
  background: #fbfbfd;
  font-family: Inter, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
body { padding-inline-start: var(--rail-width); }
main#portal-main { width: min(100%, 1580px); max-width: none; min-height: 100vh; margin: 0 auto; padding: 0 var(--gutter) 24px; }
#portal-main:focus { outline: none; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 10; background: white; color: var(--violet); padding: 12px; }
.portal-rail { position: fixed; inset: 0 auto 0 0; z-index: 3; display: flex; align-items: center; flex-direction: column; width: var(--rail-width); padding: 20px 8px 16px; background: #15162e; color: white; }
.rail-brand { display: grid; place-items: center; width: 52px; height: 46px; margin-bottom: 30px; }
.portal-mark { width: 31px; height: 31px; background: #6d52f5; border-radius: 9px 16px 9px 16px; position: relative; transform: rotate(-8deg); }
.portal-mark::after { content: ""; position: absolute; width: 13px; height: 13px; border: 3px solid white; border-radius: 50%; left: 6px; top: 6px; }
.rail-links { display: flex; flex: 1; flex-direction: column; width: 100%; gap: 8px; }
.rail-links a { display: flex; min-height: 58px; padding: 8px 3px; gap: 5px; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; color: #e4e1f7; font-size: 12px; line-height: 1.4; font-weight: 650; text-decoration: none; word-break: keep-all; }
.rail-links a:hover { background: #302f4f; }
.rail-links a[aria-current] { color: white; background: #6147cd; }
.rail-links .rail-support { margin-top: auto; }
.rail-symbol { display: block; width: 17px; height: 17px; }
.rail-studies { border: 1.5px solid; border-radius: 4px; background: linear-gradient(90deg, transparent 46%, currentColor 47% 54%, transparent 55%), linear-gradient(0deg, transparent 46%, currentColor 47% 54%, transparent 55%); }
.rail-design { border: 1.5px solid; border-radius: 3px; background: linear-gradient(0deg, transparent 28%, currentColor 29% 36%, transparent 37% 59%, currentColor 60% 67%, transparent 68%) center / 65% 100% no-repeat; }
.rail-report { border: 1.5px solid; border-radius: 3px; background: linear-gradient(to top, currentColor 35%, transparent 35%) 23% 70% / 2px 12px no-repeat, linear-gradient(to top, currentColor 58%, transparent 58%) center 70% / 2px 12px no-repeat, linear-gradient(to top, currentColor 80%, transparent 80%) 77% 70% / 2px 12px no-repeat; }
.rail-help { border: 1.5px solid; border-radius: 50%; text-align: center; font: 700 12px/15px system-ui; }
header.portal-header { gap: 15px; min-height: 76px; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
header.portal-header .brand { color: var(--ink); font: 850 24px/1 system-ui,sans-serif; letter-spacing: -.065em; }
.brand-dot, .title-dot { color: #7255d9; }
header.portal-header .brand-dot { font: inherit; }
header.portal-header .portal-header-label { border-color: var(--line); color: var(--muted); }
header.portal-header #logout { color: var(--ink); border-color: var(--line); background: #fff; }
header.portal-header #logout:hover { color: var(--violet); border-color: var(--violet); }
a, input, select, textarea, button, summary { scroll-margin-block: 16px; }
:where(a, summary, button, input, select, textarea):focus-visible, .portal-rail a:focus-visible, header.portal-header :is(.brand,#logout):focus-visible, .portal-login-card :is(input,button,a):focus-visible, .portal-footer a:focus-visible { outline: 3px solid #7c68df; outline-offset: 3px; }
main p, main h1, main h2, main h3, main h4, main label, main button { word-break: keep-all; overflow-wrap: anywhere; }
input:not([type="checkbox"]), select { min-width: 0; min-height: 45px; }
:where(#workspace, #login, #portal-no-access) button { min-height: 44px; }
button:disabled { cursor: not-allowed; }
#status.portal-status { margin-top: 15px; color: #4d426f; background: #f3f1fa; border-color: #e1dceb; }
#login.portal-login-card { display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; width: min(100%, 1010px); max-width: none; padding: 0; margin: clamp(36px, 9vh, 112px) auto; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 18px 53px #211f4710; }
.login-intro, .portal-workspace-intro { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(120deg,#efebff 0%,#e8eaff 55%,#e2edf9 100%); }
.login-intro::after, .portal-workspace-intro::after { content: ""; position: absolute; z-index: -1; pointer-events: none; right: -116px; bottom: -224px; width: 340px; height: 340px; border: 36px solid #ffffff5c; border-radius: 50%; box-shadow: 0 0 0 26px #aaa3e926, 0 0 0 60px #ffffff3d; }
.login-intro { display: flex; justify-content: center; flex-direction: column; min-height: 350px; padding: clamp(27px,4vw,57px); border-radius: 21px 0 0 21px; }
.portal-kicker, .portal-workspace-intro .portal-kicker { margin: 0 0 13px; color: #534291; font-size: 12px; font-weight: 750; letter-spacing: .035em; }
.portal-login-card h1, .portal-workspace-intro h1 { color: var(--ink); font-size: clamp(31px,3.65vw,53px); line-height: 1.13; letter-spacing: -.065em; }
.portal-login-card .portal-login-lead { max-width: 32ch; margin: 3px 0 0; color: #4a4966; }
.login-entry { align-self: center; min-width: 0; padding: clamp(26px,4vw,55px); }
.portal-login-card :is(#email-form,#code-form) button, .toolbar #new, #save { background: var(--violet); color: white; border: 1px solid var(--violet); font-weight: 750; }
.portal-login-card :is(#email-form,#code-form) button:hover:not(:disabled), .toolbar #new:hover:not(:disabled), #save:hover:not(:disabled) { background: var(--violet-dark); }
.login-entry input { border-color: #a7a6ba; }
.portal-login-help { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.portal-login-help a, .portal-access-message a, .legal-links.portal-footer a { color: var(--violet-dark); }
.portal-access-message { max-width: 680px; margin: clamp(28px,8vh,82px) auto; border-block-start: 4px solid var(--violet); border-radius: 12px; padding: clamp(24px,4vw,48px); background: white; box-shadow: 0 12px 34px #211f4710; }
.portal-access-message h1 { margin: 0 0 14px; font-size: clamp(24px,3vw,36px); }
.portal-access-message p { color: var(--muted); }
.portal-access-message a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.portal-workspace-intro { margin: 28px 0 0; padding: clamp(24px,3.2vw,49px); border-radius: 18px; }
.portal-workspace-intro h1 { margin: 0 0 10px; }
.portal-workspace-intro p { max-width: 54ch; color: #4a4966; font-size: 14px; }
.toolbar { gap: 12px 18px; padding: 18px 0; margin: 0 0 12px; border: none; background: transparent; border-radius: 0; }
.toolbar label { flex: 0 1 290px; min-width: 0; color: var(--muted); }
.toolbar select { margin: 5px 0 0; }
.toolbar #role { line-height: 1.55; color: var(--violet-dark); }
.toolbar #role:empty, #empty:empty, #version:empty { display: none; }
.columns { grid-template-columns: minmax(180px,.7fr) minmax(0,2.3fr); gap: clamp(16px,2.4vw,34px); align-items: start; }
.columns:not(:has(#editor:not([hidden]))) { grid-template-columns: 1fr; }
.columns > nav, .columns > section { min-width: 0; padding: clamp(17px,2.2vw,31px); border-color: var(--line); border-radius: 15px; box-shadow: none; }
#portal-research-list h2 { font-size: 20px; margin: 0 0 16px; }
#portal-research-list { scroll-margin-block: 18px; }
#portal-research-list p { color: var(--muted); font-size: 14px; }
.study-filter input { margin: 0 0 14px; font-size: 14px; border-color: #babaca; }
#studies button { min-height: 48px; margin-bottom: 6px; padding: 12px 14px; border-color: var(--line); background: #fff; color: #28283c; line-height: 1.5; }
#studies button[aria-current]:not([aria-current="false"]) { border-color: #b6a9f3; background: var(--lavender); color: var(--violet-dark); box-shadow: inset 3px 0 var(--violet); }
#studies button:hover { border-color: #9d8ddf; }
.research-head { border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.research-head .eyebrow { color: var(--violet); font-size: 12px; letter-spacing: .02em; }
#editor-title { font-size: clamp(24px,2.5vw,33px); line-height: 1.35; letter-spacing: -.045em; }
#version, #ux-sandbox section>p, .ux-footnote, .ux-persona-card span { color: var(--muted); }
.research-steps { gap: 4px; padding: 4px; background: #f3f2f8; border-radius: 11px; }
.research-steps button { min-height: 44px; padding: 8px 4px; color: #53516b; border: 1px solid transparent; background: transparent; text-align: center; }
.research-steps button[aria-selected="true"] { color: var(--violet-dark); background: #fff; border-color: #dcd5f3; box-shadow: 0 2px 6px #24134b09; }
#editor :is(details, .ux-grid, .research-head, .ux-profile-detail, fieldset) { min-width: 0; }
#editor details summary { cursor: pointer; min-height: 44px; align-content: center; }
#editor > :is(#saved-mock,#customer-reports,#synthetic-approved-report) { margin: 0 0 9px; padding: 4px 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; }
#editor > #synthetic-approved-report { background: var(--lavender); border-color: #d5ccf2; }
#editor > :is(#saved-mock,#customer-reports,#synthetic-approved-report) summary { color: #44375f; font-weight: 740; }
#editor > :is(#saved-mock,#customer-reports,#synthetic-approved-report)[open] { padding-bottom: 15px; }
#synthetic-approved-report > summary::marker { color: var(--violet); }
.portal-edit-guidance { padding: 1px 14px; background: #fbfaf7; }
.portal-edit-guidance .notice { margin: 0 0 9px; }
#research-mode-note { margin: 8px 0 12px; }
#study-form .storage-notice { color: #504577; }
#study-form label { font-size: 14px; }
.legal-links.portal-footer { margin-top: 28px; padding: 16px 0 0; gap: 3px 19px; color: var(--muted); border-color: var(--line); }
.legal-links.portal-footer a { min-height: 44px; }
@media (max-width: 880px) {
  :root { --rail-width: 76px; --gutter: 24px; }
  .columns { grid-template-columns: minmax(165px,.65fr) minmax(0,1.35fr); gap: 12px; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { padding-inline-start: 0; }
  .portal-rail { position: static; width: 100%; flex-direction: row; gap: 8px; padding: 4px 12px; }
  .rail-brand { width: 39px; min-width: 39px; height: 46px; margin: 0; }
  .portal-mark { width: 26px; height: 26px; }
  .portal-mark::after { width: 10px; height: 10px; left: 5px; top: 5px; }
  .rail-links { flex-direction: row; align-items: center; justify-content: flex-end; gap: 3px; }
  .rail-links a { min-height: 44px; padding: 5px 8px; border-radius: 6px; flex-direction: row; font-size: 12px; }
  .rail-links .rail-symbol { display: none; }
  .rail-links .rail-support { margin: 0 0 0 auto; }
  header.portal-header { min-height: 60px; gap: 10px; }
  header.portal-header .brand { font-size: 22px; }
  header.portal-header .portal-header-label { padding-inline-start: 10px; font-size: 12px; }
  #login.portal-login-card { grid-template-columns: 1fr; max-width: 520px; margin: 23px auto; border-radius: 16px; }
  .login-intro { min-height: auto; padding: 28px 23px; border-radius: 15px 15px 0 0; }
  .login-intro::after { right: -189px; bottom: -285px; }
  .login-entry { padding: 25px 22px; }
  .portal-workspace-intro { padding: 23px 20px; margin-top: 18px; border-radius: 13px; }
  .portal-workspace-intro::after { right: -210px; bottom: -290px; }
  .toolbar { gap: 8px; margin: 0; padding: 13px 0 18px; }
  .toolbar label { flex: 1 1 100%; }
  .toolbar #new { margin-left: auto; }
  .columns { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .columns > nav, .columns > section { padding: 16px; border-radius: 12px; }
  .legal-links.portal-footer { display: flex; gap: 0 14px; }
  .legal-links.portal-footer > span { flex: 1 0 100%; }
  .research-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ux-profile-detail { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .rail-links a { padding-inline: 5px; }
}
@media print {
  body { padding: 0; }
  .portal-rail, header.portal-header, .skip-link { display: none; }
  main#portal-main { padding: 0; }
}
.portal-code-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.portal-login-card #code-form .portal-code-actions button { flex: 1 1 100px; min-height: 44px; width: auto; padding: 6px 8px; border: 1px solid var(--line); color: var(--violet-dark); background: #fff; font-size: 13px; }
.portal-login-card #code-form .portal-code-actions button:hover:not(:disabled) { background: var(--lavender); }

/* The site wordmark and the report workspace share one navigation system. */
:root{--rail-width:188px;--gutter:clamp(22px,2.8vw,44px);background:#f4f4fb}
body{background:#f4f4fb}
.portal-rail{background:white;border-right:1px solid #e2e2ee;align-items:stretch;padding:16px 12px}
.portal-rail .rail-brand{display:flex;align-items:center;justify-content:flex-start;width:auto;gap:11px;margin:0 8px 26px;color:#101224;text-decoration:none;font:850 24px/1 system-ui,sans-serif;letter-spacing:-.065em}
.portal-mark{flex:none}.portal-mark:after{box-sizing:content-box}
.rail-links a{min-height:44px;flex-direction:row;justify-content:flex-start;gap:11px;padding:8px 13px;color:#57596d;font-size:14px;font-weight:600}
.rail-links a:hover{background:#f4f2fc;color:#4d389f}.rail-links a[aria-current]{background:#ece8fc;color:#503aa9}
header.portal-header{min-height:62px;background:white;margin-inline:calc(0px - var(--gutter));padding:0 var(--gutter)}
header.portal-header .brand{display:none}
header.portal-header .portal-header-label{border:none;padding:0;color:#43445f;font-size:14px;font-weight:650}
.portal-workspace-intro{border:0;background:transparent;padding:0;margin:24px 0 10px}.portal-workspace-intro:after{display:none}
.portal-workspace-intro h1{margin:0;color:#191a32}.portal-workspace-intro p{color:#56596e}
.dashboard-open{display:inline-flex;align-items:center;min-height:42px;padding:8px 15px;border-radius:8px;background:#604bc0;color:white;font-weight:650;text-decoration:none}.dashboard-open:hover{background:#4e38ae;color:white}
#editor:has(.rd) > details[open]{padding:12px;min-width:0}.columns:has(.rd){grid-template-columns:minmax(150px,.33fr) minmax(0,1.67fr)}
@media(max-width:1050px){:root{--rail-width:154px;--gutter:20px}}
@media(max-width:760px){:root{--gutter:15px}.portal-rail{position:static;width:100%;padding:7px 12px;display:flex;flex-wrap:wrap;gap:0;align-items:center;border-right:0;border-bottom:1px solid #e2e2ee}.portal-rail .rail-brand{height:35px;margin:0 6px;gap:8px;font-size:20px}.rail-links{flex:1 1 200px;flex-wrap:wrap;gap:1px;justify-content:flex-end}.rail-links a{font-size:12px;padding:6px;gap:0;min-height:36px}.rail-links .rail-support{margin:0}header.portal-header{min-height:47px}.columns:has(.rd){grid-template-columns:minmax(0,1fr)}.portal-workspace-intro{margin:17px 0 8px}}

.mot-wordmark{height:24px;width:auto;flex:none}@media(max-width:760px){.mot-wordmark{height:20px}}

.portal-login-help p { margin: 0; }
.portal-login-help p + p { margin-top: 8px; }
.portal-login-help a { display: inline-block; padding-block: 4px; }
.portal-login-card p.portal-field-error { margin: 4px 0 0; color: #9e2850; font-size: 14px; }
.portal-login-card input[aria-invalid="true"] { border-color: #9e2850; }
#portal-code-destination { margin: 0 0 12px; color: var(--ink); overflow-wrap: anywhere; }
#portal-code-help { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.portal-study-next { margin: 12px 0 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--lavender); }
.portal-study-next h3 { margin: 0; font-size: 16px; }
.portal-study-next p { margin: 5px 0 0; color: var(--ink); }
.portal-study-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.portal-study-actions > :not([hidden]) { margin-top: 10px; }
.portal-study-actions a { color: var(--violet-dark); font-weight: 700; }
#study-request-help { font-size: 14px; }
#study-request-help label { display: block; margin-top: 10px; }
#study-request-reference { width: 100%; min-height: 84px; resize: vertical; }
#study-copy-status { display: inline-block; margin-inline-start: 8px; }
#study-open-error { margin: 10px 0; color: #8b3b28; }
@media(max-width:640px) { #study-form, #ux-audience, #ux-persona, #ux-method { scroll-margin-top: 76px; } }
#study-unsaved { margin: 3px 0 0; color: var(--violet-dark); font-size: 14px; }

#study-review-panel { border-top:1px solid var(--portal-border, #ded8ec); margin-top:1rem; padding-top:1rem; }
#study-review-panel p { margin:.5rem 0; }
#study-review-id { overflow-wrap:anywhere; }
