@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  color-scheme: light;
  --ink: #1d1d1b;
  --muted: #605967;
  --violet: #330066;
  --coral: #ff6666;
  --yellow: #ffcc00;
  --border: #dedade;
  --background: #f8f6f9;
  --violet-light: #f0e9f6;
  --green: #205a43;
  --amber: #714c03;
  font: 1rem/1.5 Montserrat, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); }
a { color: var(--violet); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
}

.shell { min-height: 100vh; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
aside {
  background: #fff;
  border-top: 5px solid var(--violet);
  border-right: 1px solid var(--border);
  padding: 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.brand {
  display: block;
  padding: 8px 8px 25px;
  margin-bottom: 19px;
  border-bottom: 1px solid var(--border);
}
.brand img { display: block; width: min(100%, 148px); height: auto; }
nav { display: grid; gap: 5px; }
nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  border: 0;
  border-bottom: 4px solid transparent;
  padding: 10px 9px 7px;
  font-size: .875rem;
  font-weight: 640;
}
nav button:hover { border-bottom-color: var(--coral); background: #fff8f8; }
nav button.active { border-bottom-color: var(--yellow); background: var(--violet-light); color: var(--violet); font-weight: 750; }
nav i { font-style: normal; color: var(--violet); width: 18px; text-align: center; }

.top {
  min-height: 77px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 13px clamp(20px, 3vw, 42px);
  background: #fff;
  border-top: 5px solid var(--violet);
  border-bottom: 1px solid var(--border);
}
.product-brand { display: flex; align-items: center; gap: 6px; min-width: 0; }
.product-brand img { display: block; width: 44px; height: auto; }
.product-name { display: block; margin: 0; color: var(--violet); font-size: 1.125rem; line-height: 1.2; letter-spacing: .04em; }
.product-brand small { display: block; color: var(--muted); font-size: .72rem; }
.profile { font-size: .875rem; color: var(--ink); }
.profile { display: flex; align-items: center; gap: 9px; }
.profile select { max-width: 260px; }
.demo-banner {
  display: flex;
  gap: 4px 12px;
  flex-wrap: wrap;
  max-width: 1372px;
  margin: 0 auto;
  padding: 15px clamp(20px, 3vw, 42px) 0;
  font-size: .8125rem;
  color: var(--muted);
}
.demo-banner strong { color: var(--violet); }

main {
  padding: 18px clamp(20px, 3vw, 42px) 36px;
  max-width: 1372px;
  margin: auto;
}
.login-brand {
  display: flex;
  align-items: center;
  padding: 8px clamp(12px, 3vw, 42px);
  min-height: 64px;
  background: #fff;
  border-top: 5px solid var(--violet);
  border-bottom: 1px solid var(--border);
}
.login-brand .brand { margin: 0; padding: 0; border: 0; }
.login-brand .brand img { width: 116px; }
.demo-access-page { width: min(100%, 500px); padding-top: clamp(24px, 8vh, 68px); }
.demo-access-page .product-name { font-size: 1.4rem; }
.demo-access-page .form .btn { min-height: 44px; }
.hero {
  background: var(--violet);
  color: white;
  padding: clamp(24px, 3.2vw, 46px);
  border-bottom: 6px solid var(--yellow);
  margin-bottom: 25px;
}
.eyebrow {
  color: #ffe580;
  font-weight: 750;
  font-size: .8125rem;
  letter-spacing: .035em;
  margin: 0 0 11px;
}
.hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.45rem);
  font-weight: 760;
  text-transform: uppercase;
  line-height: 1.13;
  letter-spacing: -.025em;
  margin: 0 0 10px;
}
.hero p:last-child { margin: 0; line-height: 1.6; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.metric, .panel, .card { background: white; border: 1px solid var(--border); }
.metric { border-top: 3px solid var(--coral); padding: 13px 15px; }
.metric b { display: block; color: var(--violet); font-size: 1.55rem; }
.metric span, .muted { color: var(--muted); font-size: .8125rem; }
.panel { padding: clamp(14px, 2vw, 24px); margin: 0 0 20px; border-top: 3px solid var(--violet); }
.panel h2, .panel h3 { margin: 0 0 12px; }
.panel h2, dialog h2 { font-size: 1.24rem; font-weight: 750; color: var(--violet); text-transform: uppercase; }
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 15px; }
.panel-head h2 { margin: 0; }

.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #b49ac7;
  border-radius: 3px;
  color: var(--violet);
  background: #fff;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 680;
}
.btn:hover { background: var(--violet-light); border-color: var(--violet); }
.primary { background: var(--coral); color: var(--ink); border-color: var(--coral); font-weight: 750; }
.primary:hover { background: #ff8a8a; border-color: #db5353; }
.subtle { background: var(--violet-light); }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; text-align: left; }
th, td { padding: 11px 9px; border-bottom: 1px solid #eae5ed; vertical-align: middle; }
th { white-space: nowrap; background: var(--violet-light); color: var(--violet); font-size: .8125rem; }
tbody tr:hover { background: #faf8fc; }
tr:last-child td { border-bottom: 0; }
td small { display: block; }
.tag {
  display: inline-flex;
  white-space: nowrap;
  margin: 2px 3px 2px 0;
  padding: 3px 8px;
  border-radius: 2px;
  background: var(--violet-light);
  color: var(--violet);
  font-size: .75rem;
  font-weight: 720;
}
.green { background: #e6f4ec; color: var(--green); }
.amber { background: #fff1bd; color: var(--amber); }
.empty { text-align: center; padding: 26px; color: var(--muted); }
.mobile-cell-label, #navToggle { display: none; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choices label { display: flex; flex-direction: row; align-items: center; gap: 4px; font-weight: 500; }
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; }
.form label, .field { display: flex; flex-direction: column; gap: 4px; font-size: .875rem; font-weight: 630; }
.form input, .form select, .form textarea, .filters input, .filters select, .profile select {
  min-width: 0;
  max-width: 100%;
  padding: 8px;
  border: 1px solid #bcb2c4;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font-size: .875rem;
}
.profile select { max-width: min(100%, 260px); }
.form textarea { resize: vertical; min-height: 74px; }
.form input[type=checkbox] { width: auto; accent-color: var(--violet); }
.form fieldset { margin: 0; border: 1px solid var(--border); min-width: 0; }
.form fieldset legend { font-weight: 690; font-size: .875rem; }
.error { color: #a3213a; margin: 0; }
.notice { padding: 10px 12px; background: var(--violet-light); border-left: 4px solid var(--coral); color: var(--violet); margin: 0 0 12px; }
.cardlist { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.card { padding: 14px; }
.card h3 { margin: 0 0 6px; font-size: 1rem; }
.card p { margin: 6px 0; }
.check { margin-right: 5px; }
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: min(540px, 90vw);
  border-left: 5px solid var(--yellow);
  padding: 12px 18px;
  background: var(--violet);
  color: white;
  z-index: 5;
  box-shadow: 0 8px 24px #33006635;
}
dialog {
  border: 1px solid var(--border);
  border-top: 5px solid var(--violet);
  padding: 22px;
  width: min(760px, 94vw);
  max-height: 88vh;
  box-shadow: 0 15px 55px #33006650;
}
dialog::backdrop { background: #2305338c; }
dialog h2 { margin: 0; }
#notificationDialog { width: min(460px, calc(100% - 24px)); padding: 18px; }
#notificationDialog .actions { justify-content: flex-end; }
#notificationRecipients ul { padding-left: 1.25rem; }
dl { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px 20px; }
dt { font-weight: 650; }
dd { margin: 0; overflow-wrap: anywhere; }
pre { white-space: pre-wrap; }
details { margin: 9px 0; }
summary { cursor: pointer; }
.profile-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 224px), 1fr)); gap: 10px; }
.profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  text-align: left;
  background: #fff;
  color: var(--violet);
  border: 1px solid var(--border);
  font-weight: 650;
  font-size: .875rem;
}
.profile-card:hover:not(:disabled) { background: var(--violet-light); border-color: var(--violet); }
.profile-card:disabled { background: var(--violet-light); border-bottom: 4px solid var(--yellow); opacity: 1; }
.guide-rules { padding-left: 1.25rem; margin: 0; }
.guide-rules li + li { margin-top: .5rem; }
.result-detail {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 10px;
  margin: 8px 0;
}
.result-detail[open] { padding-bottom: 10px; }
.result-detail > summary {
  min-height: 44px;
  padding: 10px 0;
  color: var(--violet);
  font-weight: 650;
}
.result-detail > summary::marker { color: var(--violet); }
.result-criterion { border-top: 1px solid var(--border); padding-top: 8px; }
.result-criterion + .result-criterion { margin-top: 12px; }
.result-criterion > p { margin: 0 0 8px; }
.result-criterion .empty { padding: 8px 0; text-align: left; }

@media (max-width: 850px) {
  .shell { grid-template-columns: 172px minmax(0, 1fr); }
  aside { padding: 17px 11px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .shell { display: block; }
  aside {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px 12px;
    height: auto;
    max-height: 65dvh;
    z-index: 2;
    padding: 7px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .brand { border: 0; margin: 0; padding: 0; }
  .brand img { width: 98px; }
  #navToggle:not([hidden]) {
    display: flex;
    justify-self: end;
    gap: 9px;
    text-align: left;
  }
  #navCurrent { display: block; font-size: .75rem; color: var(--muted); }
  nav { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr)); padding: 4px; }
  #navToggle[aria-expanded="false"] + nav, nav:empty { display: none; }
  nav button { min-height: 44px; padding: 7px; overflow-wrap: anywhere; }
  nav i { flex: 0 0 18px; }
  .top { min-height: 0; border-top: 0; padding: 10px 12px; }
  .top .product-brand img { width: 38px; }
  .profile { width: 100%; display: grid; gap: 4px; font-weight: 630; }
  .profile:empty { display: none; }
  #sessionField { margin-left: 0; }
  .profile select { width: 100%; max-width: 100%; text-overflow: ellipsis; }
  main { padding: 12px 12px 28px; overflow-wrap: anywhere; }
  main h1 { scroll-margin-top: 86px; }
  .demo-banner { align-items: center; padding: 4px 12px 0; }
  .demo-banner label { min-height: 44px; }
  .hero { padding: 19px 14px 16px; margin-bottom: 16px; }
  .hero h1 { font-size: clamp(1.45rem, 5vw, 2rem); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
  .metric { padding: 8px 10px; }
  .panel { padding: 12px; margin-bottom: 14px; }
  .panel h2, dialog h2 { font-size: 1.06rem; }
  .panel-head > .actions, .filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); width: 100%; }
  .panel-head > .actions:empty { display: none; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .form label { min-width: 0; }
  .btn, .profile-card { min-height: 44px; max-width: 100%; text-align: center; white-space: normal; }
  .profile-card { text-align: left; }
  .form input, .form select, .form textarea, .filters input, .filters select, .profile select {
    min-height: 44px;
    font-size: 1rem;
  }
  .form input[type="checkbox"], table input[type="checkbox"], .demo-banner input {
    width: 24px;
    height: 24px;
    min-height: 0;
    margin: 0;
    vertical-align: middle;
  }
  .form .choices label { min-height: 44px; }
  .tag { white-space: normal; }
  .table-wrap { overflow: visible; }
  .table-wrap + h3 { margin-top: 16px; }
  table, tbody { display: block; }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  tbody { display: grid; gap: 10px; }
  tbody tr {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 3px solid var(--violet);
    padding: 4px 10px;
  }
  tbody td {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: center;
    gap: 8px;
    padding: 6px 0;
  }
  tbody td.empty-cell { display: none; }
  tbody td:not(:has(.mobile-cell-label)) { grid-template-columns: minmax(0, 1fr); }
  .mobile-cell-label { display: block; color: var(--muted); font-size: .8rem; font-weight: 650; }
  .cell-value .btn { margin: 2px 3px 2px 0; }
  dialog {
    width: calc(100% - 16px);
    max-width: none;
    max-height: calc(100dvh - 16px);
    padding: 0 12px 12px;
    overflow-wrap: anywhere;
    overscroll-behavior: contain;
  }
  #modal > .panel-head {
    position: sticky;
    top: 0;
    z-index: 1;
    flex-wrap: nowrap;
    padding: 9px 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
  }
  #modal > .panel-head .btn { flex: none; }
  dl { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px; }
  .toast { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: none; }
}

#sessionField[hidden] { display: none; }
@media (min-width: 761px) { #sessionField { margin-left: auto; } }

.demo-banner[hidden] { display: none; }
.demo-banner label { display: inline-flex; gap: 6px; align-items: center; }
.demo-banner input, table input[type=checkbox] { accent-color: var(--violet); }
.workflow-stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 12px;
  margin: 0;
  padding-left: 26px;
}
.workflow-stages li { padding: 8px 8px 8px 2px; }
.workflow-stages li::marker { color: var(--violet); font-weight: 750; }
.workflow-stages h3 { margin-bottom: 6px; }
.workflow-stages p { margin: 0; }

.criterion-note { margin: 0 0 12px; }
.criterion-note input { max-width: 12rem; }
.criterion-note small { display: block; margin-top: 4px; }

.rubric-reference {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.rubric-reference summary { color: var(--violet); font-weight: 750; cursor: pointer; }
.rubric-reference dl { display: block; }
.rubric-reference dt { margin-top: 10px; font-weight: 650; }
.rubric-reference dd { margin: 0; }
.rubric-reference ul { margin: 4px 0; padding-left: 24px; }
