/* ui/trial/styles.css */
:root {
  font-family:
    Inter,
    "Noto Sans SC",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
  color: #223143;
  background: #f3f5f8;
  font-size: 15px;
  line-height: 1.55;
  --primary:#205eaa;
  --border:#dce3ec;
  --muted:#69788b;
  --danger:#a62929;
  --success:#246848;
  --warning:#805a08;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  border: 1px solid #cbd5e2;
  border-radius: 7px;
  background: white;
  color: #253c58;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}
button:hover:not(:disabled) {
  background: #eef4fb;
  border-color: #7397c3;
}
button:disabled {
  cursor: not-allowed;
  opacity: .58;
}
button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
button.primary:hover:not(:disabled) {
  background: #174c8c;
}
button.quiet {
  background: transparent;
}
a {
  color: var(--primary);
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #74b2fb;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -.02em;
}
h2 {
  font-size: 18px;
  line-height: 1.5;
}
h3 {
  font-size: 15px;
}
p + p {
  margin-top: 8px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 7px;
}
.site-header {
  height: 80px;
  padding: 0 max(24px, calc((100vw - 1320px)/2));
  border-bottom: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.2;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  margin-top: 5px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  background: #1e568f;
  border-radius: 10px;
  color: white;
  font-size: 22px;
}
.account {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 14px;
}
.account span {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
main {
  max-width: 1320px;
  margin: auto;
  padding: 32px 24px 92px;
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 5px #1a355006;
}
.boot {
  max-width: 480px;
  margin: 100px auto;
  text-align: center;
  padding: 40px;
}
.boot .spinner {
  display: inline-block;
  margin-bottom: 12px;
}
.boot button {
  margin-top: 18px;
}
.login-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 64px;
  max-width: 970px;
  align-items: center;
  min-height: 65vh;
  margin: auto;
}
.login-intro h1 {
  font-size: 42px;
  max-width: 500px;
}
.login-intro > p:not(.eyebrow) {
  font-size: 17px;
  max-width: 430px;
  color: #65758a;
  margin-top: 18px;
}
.scope-note {
  font-size: 13px;
  color: #586b81;
  line-height: 1.85;
  border-left: 3px solid #a7bdd6;
  padding-left: 16px;
  margin-top: 36px;
}
.login-form {
  padding: 30px;
}
.login-form h2 {
  margin-bottom: 22px;
}
form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 17px 0 6px;
}
input {
  width: 100%;
  border: 1px solid #c7d2df;
  border-radius: 7px;
  padding: 10px 11px;
  background: white;
  color: #24354a;
  min-width: 0;
}
input[type=file] {
  font-size: 13px;
  padding: 8px;
  overflow: hidden;
}
input::file-selector-button {
  border: 0;
  background: #eaf0f7;
  color: #284c76;
  border-radius: 4px;
  padding: 5px 9px;
  margin-right: 8px;
}
.login-form .primary,
.upload-form .primary {
  width: 100%;
  margin-top: 20px;
  min-height: 41px;
}
.login-form > .muted {
  margin-top: 16px;
}
.inline-message {
  font-size: 13px;
  line-height: 1.6;
  margin-top: 10px;
  min-height: 0;
  overflow-wrap: anywhere;
}
.inline-message:empty {
  display: none;
}
.inline-message.error {
  color: var(--danger);
}
.inline-message.success {
  color: var(--success);
}
.inline-message.busy {
  color: var(--primary);
}
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.workspace-heading .muted {
  font-size: 14px;
  margin-top: 7px;
}
.notice {
  border: 1px solid #d6e3f2;
  background: #edf4fc;
  border-radius: 8px;
  padding: 13px 17px;
  margin: 16px 0 20px;
  font-size: 14px;
  color: #345477;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.notice strong {
  font-weight: 700;
}
.notice span {
  flex: 1;
  min-width: 240px;
}
#owner-notice {
  margin: -8px 0 16px;
}
.workspace-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.project-sidebar {
  display: grid;
  gap: 18px;
}
.upload-form {
  padding: 21px;
}
.upload-form label:first-of-type {
  margin-top: 14px;
}
#upload-limit {
  margin-top: 6px;
}
.project-list-panel {
  overflow: hidden;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.project-list-panel > .section-heading {
  padding: 17px 20px;
  border-bottom: 1px solid var(--border);
}
.count {
  font-size: 12px;
  background: #eff3f7;
  border-radius: 20px;
  min-width: 24px;
  padding: 2px 8px;
  text-align: center;
  color: #52677f;
}
.project-list {
  max-height: 420px;
  overflow: auto;
  padding: 8px;
}
.project-choice {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  display: block;
  padding: 13px 12px;
  border-radius: 6px;
  font-weight: 400;
  margin-bottom: 3px;
}
.project-choice:hover:not(:disabled) {
  border-color: #dce4ef;
}
.project-choice[aria-current=true] {
  background: #edf4fd;
  border-color: #b9d0ec;
}
.project-choice strong {
  display: block;
  font-size: 14px;
  color: #243f62;
  overflow-wrap: anywhere;
}
.project-choice small {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}
.project-choice .badge {
  font-size: 11px;
  padding: 2px 6px;
}
.project-detail {
  min-height: 560px;
  padding: 28px;
}
.empty-state {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  gap: 12px;
}
.empty-state h2 {
  color: #425975;
}
.empty-state p {
  max-width: 370px;
  font-size: 14px;
}
.empty-icon {
  font-size: 58px;
  line-height: 1;
  color: #bacbdf;
  font-weight: 300;
}
.empty {
  padding: 21px 15px;
  color: var(--muted);
  font-size: 13px;
}
.detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.detail-heading h2 {
  font-size: 23px;
  overflow-wrap: anywhere;
}
.detail-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  border-radius: 5px;
  padding: 4px 9px;
  background: #edf1f5;
  color: #5b6c80;
  white-space: nowrap;
}
.badge.good {
  background: #e5f3eb;
  color: var(--success);
}
.badge.bad {
  background: #fff0ed;
  color: var(--danger);
}
.badge.wait {
  background: #fff4d9;
  color: var(--warning);
}
.badge.active {
  background: #e8f2ff;
  color: #255a98;
}
.detail-section {
  border-top: 1px solid #e5eaf0;
  padding-top: 22px;
  margin-top: 24px;
}
.file-list,
.job-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #edf0f5;
}
.file-row:last-child {
  border-bottom: 0;
}
.file-info {
  flex: 1;
  min-width: 0;
}
.file-info strong {
  font-size: 14px;
  font-weight: 500;
  display: block;
  overflow-wrap: anywhere;
}
.file-info small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.file-row a {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.job-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0 8px;
}
.job-actions .muted {
  font-size: 13px;
  max-width: 420px;
}
.job-row {
  border: 1px solid #e0e6ee;
  border-radius: 8px;
  padding: 15px 16px;
  margin-bottom: 12px;
}
.job-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.job-top h3 {
  font-size: 14px;
}
.job-description {
  color: #63758b;
  font-size: 13px;
  margin-top: 9px;
  overflow-wrap: anywhere;
}
.job-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.job-footer button {
  padding: 4px 9px;
  font-size: 12px;
  margin-left: auto;
}
.job-id {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: #8591a1;
  overflow-wrap: anywhere;
  margin-top: 8px;
}
.timeline {
  display: flex;
  gap: 0;
  margin: 20px 0 8px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}
.timeline li {
  flex: 1;
  position: relative;
  padding-top: 15px;
  border-top: 2px solid #e2e8f0;
}
.timeline li:before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  background: #dce4ef;
  border: 2px solid white;
  position: absolute;
  top: -6px;
  left: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #dce4ef;
}
.timeline li.complete {
  color: var(--success);
  border-color: #85b69c;
}
.timeline li.complete:before {
  background: #3b8960;
  box-shadow: 0 0 0 1px #3b8960;
}
.timeline li.current {
  color: var(--primary);
  font-weight: 700;
}
.timeline li.current:before {
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}
.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 47px;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 11px 24px;
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 12px;
  z-index: 5;
}
.connection {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
  color: #5d7087;
}
.connection i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ba9bb;
}
.connection.online i {
  background: #3d9567;
}
.connection.offline i {
  background: #c47e26;
}
#global-status {
  flex: 1;
  overflow-wrap: anywhere;
  color: #53687f;
}
#global-status.error {
  color: var(--danger);
}
.last-sync {
  white-space: nowrap;
  color: #7f8ea1;
}
.spinner {
  width: 19px;
  height: 19px;
  border: 2px solid #dce8f5;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  background: white;
  padding: 8px;
}
.skip-link:focus {
  top: 10px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}
@media (max-width: 900px) {
  .workspace-grid {
    grid-template-columns: 285px minmax(0, 1fr);
    gap: 16px;
  }
  .project-detail {
    padding: 20px;
  }
  .login-layout {
    gap: 35px;
  }
  .login-intro h1 {
    font-size: 35px;
  }
}
@media (max-width: 680px) {
  .site-header {
    height: 70px;
    padding: 0 18px;
  }
  .brand {
    font-size: 16px;
  }
  .account {
    gap: 8px;
  }
  .account span {
    max-width: 90px;
  }
  main {
    padding: 24px 16px 110px;
  }
  .login-layout {
    display: flex;
    flex-direction: column;
    gap: 26px;
    min-height: 0;
    align-items: stretch;
  }
  .login-intro h1 {
    font-size: 30px;
  }
  .login-intro > p:not(.eyebrow) {
    font-size: 15px;
  }
  .scope-note {
    margin-top: 20px;
  }
  .login-form {
    padding: 24px;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .project-sidebar {
    grid-template-columns: 1fr;
  }
  .project-list {
    max-height: 260px;
  }
  .project-detail {
    min-height: 400px;
  }
  .empty-state {
    min-height: 320px;
  }
  .workspace-heading {
    align-items: flex-start;
  }
  h1 {
    font-size: 25px;
  }
  .notice {
    gap: 6px;
  }
  .notice span {
    min-width: 0;
    flex-basis: 100%;
  }
  .job-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
  .status-bar {
    padding: 9px 16px;
    gap: 7px 14px;
    flex-wrap: wrap;
  }
  .last-sync {
    display: none;
  }
  #global-status {
    flex-basis: 75%;
    font-size: 12px;
  }
  .detail-heading {
    flex-wrap: wrap;
  }
  .timeline {
    font-size: 11px;
  }
  .file-row {
    gap: 9px;
  }
}
.section-empty {
  margin-top: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.workspace-heading > button {
  white-space: nowrap;
  flex-shrink: 0;
}
.qualification-notice {
  background: #fff5e5;
  border-color: #edd3a5;
  color: #875f21;
}
.owner-admin {
  margin: 0 0 22px;
}
.owner-admin > summary {
  cursor: pointer;
  padding: 15px 20px;
  font-weight: 650;
}
.owner-admin > summary .small {
  font-weight: 400;
  margin-left: 14px;
}
.admin-body {
  padding: 0 22px 22px;
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  margin-top: 20px;
}
.admin-create {
  padding-right: 30px;
  border-right: 1px solid var(--border);
}
.admin-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.password-row {
  display: flex;
  gap: 8px;
}
.password-row input {
  flex: 1;
  min-width: 0;
}
.password-row button {
  flex-shrink: 0;
  white-space: nowrap;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.5;
}
.checkbox-row input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.admin-user-list {
  max-height: 190px;
  overflow: auto;
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 7px;
}
.admin-user-list button {
  font-size: 12px;
  font-weight: 500;
}
.admin-user-list button[aria-current=true] {
  background: #edf4fd;
  border-color: #b9d0ec;
}
.admin-user-list button small {
  color: var(--muted);
  margin-left: 6px;
}
#admin-grant-form {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
#admin-reset-form {
  margin-top: 20px;
  padding-top: 3px;
  border-top: 1px solid var(--border);
}
.danger {
  color: #a62929;
  border-color: #e0bcbc;
}
.secret-card {
  background: #edf6ef;
  border: 1px solid #c9dece;
  border-radius: 8px;
  padding: 18px;
  margin-top: 24px;
}
.secret-card label {
  display: block;
  font-size: 13px;
  margin: 12px 0 5px;
}
.secret-card textarea {
  font: 14px/1.65 ui-monospace, monospace;
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid #b8ccb9;
  border-radius: 5px;
  resize: vertical;
}
.admin-create > .primary {
  margin-top: 16px;
}
#admin-selected-status,
#admin-usage {
  margin-top: 5px;
}
@media (max-width: 680px) {
  .admin-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .admin-create {
    border-right: 0;
    padding-right: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
  }
  .owner-admin > summary .small {
    display: block;
    margin-left: 0;
    margin-top: 5px;
  }
  .admin-body {
    padding: 0 16px 18px;
  }
  .password-row {
    flex-wrap: wrap;
  }
  .password-row input {
    flex-basis: 100%;
  }
}
.quota-summary {
  margin: 0 0 18px;
  line-height: 1.8;
}
.quota-reason {
  color: #875f21;
}
.technical-details {
  font-size: 11px;
  color: #8290a0;
  margin-top: 8px;
}
.technical-details summary {
  cursor: pointer;
}
.technical-details p {
  margin-top: 5px;
}
.technical-details[open] {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.inline-message.warning,
#global-status.warning {
  color: var(--warning);
}
.workspace-open-link {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 600;
}
.workspace-open-link:hover {
  background: #174c8c;
}
.practice-entry {
  padding: 12px;
  border: 1px solid var(--line,#dce7eb);
  border-radius: 10px;
  background: #f4f9fa;
  margin: 10px 0 16px;
}
.practice-entry button {
  width: 100%;
  font-weight: 650;
}
.practice-entry p {
  margin: 8px 0 0;
  line-height: 1.55;
}
.public-intro {
  padding: 28px;
  margin-bottom: 20px;
}
.public-intro > p {
  max-width: 850px;
  margin-top: 12px;
}
.public-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 20px 0;
}
.public-five {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding-left: 22px;
  font-size: 14px;
}
.public-intro video {
  display: block;
  width: 100%;
  max-width: 720px;
  max-height: 65vh;
  margin-top: 12px;
  background: #17272d;
}
.public-intro summary {
  cursor: pointer;
  margin-top: 18px;
}
.public-resume {
  padding: 20px;
  margin-bottom: 20px;
}
.public-resume button {
  margin: 8px 8px 8px 0;
}
.public-resume p {
  margin: 8px 0;
}
#boot-panel {
  max-width: none;
  text-align: left;
  margin: 12px 0;
  padding: 12px 18px;
  font-size: 13px;
}
#boot-panel .spinner {
  margin: 0 10px 0 0;
  width: 14px;
  height: 14px;
}
#boot-panel button {
  margin-top: 8px;
}
.login-layout {
  min-height: 0;
  margin: 24px auto;
}
.login-intro h1 {
  font-size: 28px;
}
@media (max-width: 680px) {
  .public-intro {
    padding: 18px;
  }
  .public-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .public-five {
    display: block;
  }
  .public-five li {
    margin: 7px 0;
  }
  .public-resume button {
    width: 100%;
  }
}
.admin-history > summary {
  line-height: 1.55;
}
.history-body {
  padding: 0 22px 22px;
}
.history-notice {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 960px;
}
.history-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 18px;
}
.history-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 18px;
  background: #f8fafc;
}
.history-card h3 {
  margin-bottom: 16px;
  font-size: 16px;
}
.history-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: #465a72;
}
.history-field input,
.history-field select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font: inherit;
  font-weight: 400;
  color: #24354a;
  background: white;
  border: 1px solid #c7d2df;
  border-radius: 7px;
  padding: 10px 11px;
  min-height: 42px;
}
.history-field select:focus-visible {
  outline: 3px solid #74b2fb;
  outline-offset: 3px;
}
.history-account-row,
.history-renew-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.history-account-row button,
.history-renew-row button {
  min-height: 42px;
  white-space: nowrap;
}
.history-account-summary {
  margin: 16px 0;
  font-size: 13px;
  color: #52677f;
  overflow-wrap: anywhere;
}
.history-account-summary dl {
  margin: 0;
  display: grid;
  gap: 9px;
}
.history-account-summary dl > div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
}
.history-account-summary dt {
  color: var(--muted);
}
.history-account-summary dd {
  margin: 0;
  color: #304760;
  min-width: 0;
}
.history-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 12px;
}
.history-actions button {
  min-height: 42px;
  max-width: 100%;
}
.history-results {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.history-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.history-status {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f0f5fb;
  border-radius: 7px;
  color: #47627e;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.history-status:empty {
  display: none;
}
.history-events {
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
  max-height: 430px;
  overflow: auto;
  overscroll-behavior: contain;
}
.history-events:empty {
  display: none;
}
.history-events li {
  padding: 13px 2px;
  border-bottom: 1px solid #e6ebf1;
}
.history-events li:last-child {
  border-bottom: 0;
}
.history-event-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.history-event-heading strong {
  font-size: 14px;
}
.history-event-outcome {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 5px;
  background: #eaf0f6;
  color: #536d88;
  font-size: 12px;
}
.history-event-outcome[data-outcome=error] {
  color: var(--danger);
  background: #fff0ed;
}
.history-event-outcome[data-outcome=ok] {
  color: var(--success);
  background: #e5f3eb;
}
.history-event-meta,
.history-event-error {
  margin-top: 6px !important;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.history-event-error {
  color: var(--danger);
}
@media (max-width: 960px) {
  .history-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .history-card {
    padding: 16px;
  }
}
@media (max-width: 480px) {
  .history-body {
    padding: 0 14px 16px;
  }
  .admin-history > summary {
    padding: 14px;
  }
  .history-columns {
    gap: 14px;
  }
  .history-card {
    padding: 14px;
  }
  .history-dates {
    grid-template-columns: minmax(0, 1fr);
  }
  .history-account-row,
  .history-renew-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .history-account-summary dl > div {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 8px;
  }
  .history-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .history-actions button {
    width: 100%;
  }
  .history-event-heading {
    align-items: flex-start;
  }
  .history-result-heading button {
    white-space: nowrap;
  }
  .history-events {
    max-height: 360px;
  }
}
.public-auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.public-auth-actions a,
.public-auth-actions button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 650;
}
.public-auth-actions a {
  border: 1px solid #ccd6e3;
  background: #fff;
}
.public-intro h1 {
  font-size: 28px;
}
.home-upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #edf4fc;
  border: 1px solid #bbcee7;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}
.home-upload button {
  min-height: 46px;
  flex-shrink: 0;
}
.public-intro .challenge-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.public-intro .challenge-card {
  padding: 16px;
  gap: 7px;
}
.public-intro .challenge-card h2 {
  font-size: 18px;
}
.challenge-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}
.challenge-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
  border: 1px solid #b7cce6;
  border-radius: 7px;
  padding: 8px;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
}
.challenge-actions a:first-child {
  color: #fff;
  background: #205eaa;
  border-color: #205eaa;
}
.login-layout .login-intro {
  display: none;
}
.login-layout {
  display: block;
  max-width: 580px;
  margin: 0 0 18px;
}
.login-layout .login-form {
  max-width: none;
}
.login-password-row {
  display: flex;
  gap: 8px;
}
.login-password-row input {
  flex: 1;
  min-width: 0;
}
.login-password-row button {
  flex-shrink: 0;
  min-width: 58px;
}
.field-error {
  display: block;
  color: #a62929;
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
}
.field-error:empty {
  display: none;
}
input[aria-invalid=true] {
  border-color: #b62e2e;
  background: #fff7f5;
}
#trial-register-status:not(:empty) {
  padding: 10px;
  border-radius: 6px;
  background: #f0f4fa;
}
#trial-register-form label {
  display: block;
  margin: 12px 0;
}
#trial-register-form input {
  width: 100%;
  font-size: 16px;
}
#trial-register-submit,
#trial-register-cancel {
  min-height: 44px;
  margin: 8px 6px 0 0;
}
@media (max-width: 900px) {
  .public-intro .challenge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .site-header {
    padding: 12px 14px;
    height: auto;
    min-height: 72px;
    gap: 8px;
  }
  .brand {
    gap: 7px;
    font-size: 16px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
  }
  .public-auth-actions {
    gap: 6px;
  }
  .public-auth-actions a,
  .public-auth-actions button {
    padding: 8px 12px;
  }
  .public-intro {
    padding: 14px;
  }
  .public-intro h1 {
    font-size: 24px;
  }
  .home-upload {
    padding: 14px;
    gap: 10px;
    align-items: flex-start;
  }
  .home-upload h2 {
    font-size: 17px;
  }
  .home-upload button {
    padding: 9px 12px;
  }
  .public-intro .challenge-grid {
    gap: 8px;
  }
  .public-intro .challenge-card {
    padding: 12px;
    gap: 6px;
  }
  .public-intro .challenge-card h2 {
    font-size: 16px;
  }
  .public-intro .challenge-card p {
    font-size: 12px;
  }
  .public-intro .challenge-card > span:not(.challenge-level) {
    font-size: 12px;
  }
  .challenge-level {
    font-size: 11px;
  }
  .challenge-level strong {
    margin-left: 3px;
    padding: 2px 3px;
  }
  .challenge-actions a {
    font-size: 12px;
    padding: 7px 3px;
  }
  .login-layout input {
    font-size: 16px;
  }
  .account {
    gap: 8px;
  }
  .account span {
    max-width: 90px;
  }
}
.login-password-row .password-visibility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 9px;
  flex: 0 0 44px;
}
.password-visibility svg {
  pointer-events: none;
}
.registration-field {
  margin: 12px 0;
}
.registration-field > label {
  margin-bottom: 6px !important;
}
.registration-field .login-password-row input {
  width: 0 !important;
  flex: 1;
}
#admin-invitations {
  padding: 16px;
  border: 1px solid var(--line, #d8e0e8);
  border-radius: 12px;
  margin-bottom: 20px;
  min-width: 0;
}
#admin-invitations .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
#admin-invitations select,
#admin-invitations button {
  min-height: 44px;
}
#admin-invitations textarea {
  box-sizing: border-box;
  font: 13px/1.6 monospace;
  resize: vertical;
}
#admin-invitations .admin-invitation-row {
  border-bottom: 1px solid var(--line, #d8e0e8);
  padding: 8px 0;
  overflow-wrap: anywhere;
}
#admin-invitations .admin-invitation-row p {
  margin: 4px 0;
}
#admin-invitations details {
  margin-top: 14px;
}
#admin-invitations summary {
  cursor: pointer;
  min-height: 44px;
  align-content: center;
}
.account .admin-entry {
  min-height: 44px;
  background: #e8f1fc;
  border-color: #8cacd2;
  color: #164e90;
  white-space: nowrap;
}
#owner-admin,
#admin-loader {
  scroll-margin-top: 20px;
}
@media (max-width: 560px) {
  .site-header {
    flex-wrap: wrap;
  }
  .site-header .account {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .account button {
    min-height: 44px;
    padding: 8px 10px;
  }
}
.signed-in-home .public-intro .library-intro,
.signed-in-home .public-intro .home-upload {
  display: none;
}
.signed-in-home #workspace {
  margin-bottom: 24px;
}
.signed-in-home .public-intro {
  margin-top: 20px;
}
.library-intro p {
  margin-top: 10px;
  color: var(--muted);
}
.library-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.library-toolbar button {
  min-height: 44px;
}
.workspace-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.project-sidebar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-detail {
  width: 100%;
  min-height: 0;
  scroll-margin-top: 20px;
}
.project-detail .empty-state {
  min-height: 120px;
}
.upload-panel > summary {
  padding: 14px 20px;
  min-height: 48px;
  cursor: pointer;
  font-weight: 650;
}
.upload-panel .upload-form {
  max-width: 720px;
  padding-top: 0;
}
.project-list {
  max-height: none;
  overflow: visible;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.project-list > .empty {
  grid-column: 1/-1;
}
.workpiece-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.workpiece-card[data-selected=true] {
  border-color: #6091cd;
  box-shadow: 0 0 0 1px #6091cd;
}
.workpiece-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 320/204;
  background:
    linear-gradient(
      155deg,
      #f0f5f8,
      #e3ebf2);
  text-decoration: none;
  overflow: hidden;
  color: #62758a;
}
.workpiece-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.thumbnail-placeholder {
  font-size: 13px;
  text-align: center;
  padding: 16px;
}
.thumbnail-caption {
  position: absolute;
  bottom: 8px;
  left: 10px;
  border-radius: 4px;
  padding: 2px 6px;
  background: #fff9;
  color: #586d82;
  font-size: 11px;
}
.workpiece-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
  min-width: 0;
}
.workpiece-body h3 {
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.workpiece-status .badge {
  white-space: normal;
}
.workpiece-counts {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 5px 0;
}
.workpiece-counts > div {
  display: flex;
  flex-direction: column;
}
.workpiece-counts dt {
  font-size: 12px;
  color: var(--muted);
}
.workpiece-counts dd {
  margin: 1px 0 0;
  font-size: 19px;
  font-weight: 650;
  color: #29455f;
}
.workpiece-note {
  line-height: 1.5;
}
.workpiece-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: auto;
  padding-top: 5px;
}
.workpiece-actions a,
.workpiece-actions button {
  font-size: 13px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c4d1df;
  border-radius: 7px;
  text-decoration: none;
  padding: 8px 5px;
  font-weight: 600;
  text-align: center;
}
.workpiece-actions .primary-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.workpiece-actions .replan-link {
  color: #205eaa;
  background: #edf4fc;
}
.workpiece-actions a:hover {
  border-color: #5682b7;
  filter: brightness(.98);
}
.case-library > summary {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  cursor: pointer;
  min-height: 48px;
  font-size: 20px;
  font-weight: 650;
  list-style: none;
  margin: 0;
}
.case-library > summary:before {
  content: "\25b8";
  color: #567087;
}
.case-library[open] > summary:before {
  content: "\25be";
}
.case-library > summary .small {
  font-weight: 400;
  margin-left: auto;
}
.challenge-thumbnail {
  order: -1;
  position: relative;
  aspect-ratio: 320/204;
  background: #eaf0f5;
  border-radius: 8px;
  overflow: hidden;
}
.challenge-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.challenge-thumbnail > span {
  position: absolute;
  bottom: 6px;
  left: 8px;
  font-size: 11px;
  color: #607487;
  background: #fff9;
  padding: 1px 5px;
  border-radius: 4px;
}
.public-intro .challenge-card {
  background: #fff;
  border-color: var(--border);
}
.challenge-actions button {
  min-height: 44px;
  background: #edf4fc;
  color: #205eaa;
  font-size: 14px;
}
.challenge-actions a:first-child {
  color: #205eaa;
  background: #fff;
  border-color: #b7cce6;
}
.case-account-note {
  font-weight: 400;
  line-height: 1.45;
}
.case-boundary {
  margin: 8px 0 0;
}
.home-help {
  border-top: 1px solid var(--border);
  padding-top: 15px;
  margin-top: 15px !important;
}
.home-help a {
  display: inline-block;
  min-height: 44px;
  padding: 10px 0;
  font-size: 14px;
}
.public-intro .challenge-card p {
  font-size: 13px;
}
.case-library .challenge-card h2 {
  font-size: 17px;
}
@media (max-width: 1100px) {
  .project-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
  }
  .workpiece-body {
    padding: 12px;
  }
  .workspace-heading {
    align-items: flex-start;
  }
  .library-toolbar {
    justify-content: flex-end;
  }
  .workspace-heading .muted {
    max-width: 420px;
  }
}
@media (max-width: 560px) {
  .project-list {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .workpiece-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: start;
  }
  .workpiece-preview {
    width: 112px;
    aspect-ratio: 1/1;
    border-radius: 7px;
    margin: 12px 0 0 10px;
  }
  .workpiece-body {
    padding: 12px 10px 12px 20px;
  }
  .workpiece-counts {
    gap: 18px;
  }
  .workpiece-body h3 {
    font-size: 16px;
  }
  .workpiece-note {
    display: none;
  }
  .workpiece-counts dd {
    font-size: 18px;
  }
  .workpiece-actions {
    margin-left: -122px;
    margin-top: 3px;
  }
  .workpiece-status .badge {
    font-size: 11px;
  }
  .workpiece-body > p.muted.small {
    font-size: 11px;
  }
  .case-library > summary {
    font-size: 18px;
  }
  .case-library > summary .small {
    font-size: 12px;
    margin-left: 0;
  }
  .public-intro .challenge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .challenge-actions button {
    font-size: 12px;
    padding: 8px 4px;
  }
  .library-toolbar button {
    padding: 8px 10px;
  }
  .workspace-heading {
    gap: 12px;
    flex-wrap: wrap;
  }
  .library-toolbar {
    justify-content: flex-start;
  }
  .workspace-heading h1 {
    font-size: 25px;
  }
  .signed-in-home .public-intro {
    padding: 14px;
  }
  .upload-form input {
    font-size: 16px;
  }
  .project-list-panel > .section-heading {
    padding: 14px 16px;
  }
  .case-account-note {
    font-size: 11px;
  }
}
@media (max-width: 360px) {
  .public-intro .challenge-grid {
    grid-template-columns: 1fr;
  }
}
.help-page main {
  max-width: 1000px;
}
.help-page .help-lead {
  font-size: 17px;
  color: var(--muted);
  margin: 15px 0 22px;
}
.help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
.help-nav a {
  padding: 8px 13px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 7px;
  min-height: 44px;
  text-decoration: none;
}
.help-section {
  padding: 24px;
  margin: 18px 0;
  scroll-margin-top: 20px;
}
.help-section h2 {
  font-size: 22px;
  margin-bottom: 12px;
}
.help-section h3 {
  font-size: 17px;
  margin: 20px 0 8px;
}
.help-section p,
.help-section li {
  line-height: 1.8;
}
.help-section ol,
.help-section ul {
  padding-left: 24px;
}
.help-section details {
  border-top: 1px solid var(--border);
  margin-top: 18px;
  padding-top: 12px;
}
.help-section summary {
  cursor: pointer;
  font-weight: 650;
  min-height: 44px;
}
.help-section video {
  width: 100%;
  max-width: 720px;
  display: block;
  margin: 12px 0;
  background: #1b2939;
}
.help-table {
  width: 100%;
  border-collapse: collapse;
}
.help-table td,
.help-table th {
  text-align: left;
  vertical-align: top;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}
.help-table th {
  font-size: 14px;
}
.help-section .help-note {
  padding: 12px 15px;
  background: #edf4fc;
  border-radius: 8px;
}
.help-case-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.help-case-links a {
  min-height: 44px;
  padding: 9px 0;
}
@media (max-width: 560px) {
  .help-page .site-header {
    height: auto;
    min-height: 72px;
    flex-wrap: wrap;
  }
  .help-section {
    padding: 18px;
  }
  .help-table {
    font-size: 13px;
  }
  .help-table td,
  .help-table th {
    padding: 8px 5px;
  }
}
.library-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.library-sort select {
  width: auto;
  max-width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  font-size: 13px;
}
.project-list-panel > .section-heading h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}
.project-list-panel > .section-heading {
  gap: 12px;
  flex-wrap: wrap;
}
.library-first-use {
  padding: 20px;
  margin: 12px 0;
  border: 1px solid #9abdc0;
  border-radius: 10px;
  background: #edf6f5;
}
.library-first-use h3 {
  margin: 0 0 8px;
}
.library-first-use p {
  line-height: 1.6;
}
.library-first-use button {
  min-height: 44px;
}
.header-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-underline-offset: 4px;
}
.public-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 24px 0;
  scroll-margin-top: 20px;
  background: #f7fafc;
}
.public-contact-copy {
  max-width: 720px;
  min-width: 0;
}
.public-contact-copy h2 {
  font-size: 23px;
  margin: 4px 0 12px;
}
.public-contact-copy > p {
  line-height: 1.7;
}
.public-contact-copy .eyebrow {
  margin: 0;
}
.public-contact-id {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 4px;
}
.public-contact-id code {
  user-select: all;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: .02em;
  color: #203a54;
}
.public-contact-id button {
  min-height: 44px;
}
.public-contact-status {
  min-height: 1.5em;
  margin: 4px 0;
}
.public-contact-qr {
  flex: 0 0 180px;
  margin: 0;
  text-align: center;
}
.public-contact-qr img {
  display: block;
  width: 180px;
  height: auto;
  max-width: 100%;
  background: #fff;
}
.public-contact-qr figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.registration-contact {
  display: inline-block;
  min-height: 44px;
  padding: 10px 0;
}
@media (max-width: 560px) {
  .header-contact {
    font-size: 13px;
    padding: 8px;
  }
  .public-contact {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px;
  }
  .public-contact-copy h2 {
    font-size: 21px;
  }
  .public-contact-qr {
    flex: none;
    align-self: center;
  }
  .public-contact-id {
    gap: 8px;
  }
  .public-contact-id code {
    font-size: 17px;
  }
  .public-contact-id button {
    margin-left: auto;
  }
}
/* ui/trial/challenge.css */
.challenge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.challenge-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  text-decoration: none;
  color: #17243a;
  background: #fff;
  min-width: 0;
}
.challenge-card:hover,
.challenge-card:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px #dbeafe;
  outline: none;
}
.challenge-card.recommended {
  border-color: #76a7e5;
  background: #f3f8ff;
}
.challenge-card h2,
.challenge-card p {
  margin: 0;
}
.challenge-card h2 {
  font-size: 1.25rem;
}
.challenge-card p {
  font-weight: 600;
}
.challenge-card > span:not(.challenge-level) {
  font-size: .9rem;
  color: #526078;
  line-height: 1.6;
}
.challenge-card b {
  margin-top: auto;
  padding-top: 9px;
  color: #1d4ed8;
}
.challenge-level {
  font-size: .85rem;
  color: #526078;
}
.challenge-level strong {
  margin-left: 8px;
  background: #dbeafe;
  color: #1e40af;
  padding: 3px 7px;
  border-radius: 8px;
}
.practice-entry select {
  width: 100%;
  margin: 5px 0 12px;
}
#challenge-guide ol {
  padding-left: 22px;
  line-height: 1.8;
}
@media (max-width: 560px) {
  .challenge-grid {
    grid-template-columns: 1fr;
  }
  .challenge-card {
    padding: 16px;
  }
}
