/* Compatibility for Django forms; the original PHP CSS remains unmodified. */
.navbar-default1{background-color:#fff;border-color:#fff;margin-bottom:0}
.test-answer{display:block;position:relative;width:60px;height:60px;margin:0;cursor:pointer}
.test-answer-input{position:absolute;width:1px;height:1px;opacity:0}
.test-answer:has(input:focus-visible){outline:2px solid #068f90;outline-offset:2px}
.test-answer .sprite{display:block;cursor:pointer}
.test_body_button a.btn{line-height:36px}
.errorlist{color:#a94442;text-align:left}
.form-horizontal .errorlist{list-style:none;text-align:center;padding:0}
.frontend-form input:not([type=hidden]),.frontend-form select{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background:#fff;border:1px solid #ccc;border-radius:4px}

/* Ensure .bodyy clears floats without clipping the top-right account dropdown */
.bodyy {
  overflow: visible;
  display: flow-root;
}

/* ==========================================================================
   Unified Frontend Header & Shared Top-Right Account Menu
   ========================================================================== */
.fe-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2ecee;
  padding: 0 15px;
  margin-bottom: 16px;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

.bodyy > .fe-topbar {
  margin-left: -15px;
  margin-right: -15px;
}

/* Prevent double top horizontal rule on homepage right beneath .fe-topbar */
.fe-topbar + .div_hr1,
.fe-topbar ~ .div_hr1:first-of-type {
  display: none;
}

.fe-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
  padding: 10px 0;
}

.fe-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-shrink: 0;
}

.fe-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
}

.fe-logo {
  width: 178px;
  height: auto;
  display: block;
}

.fe-tagline {
  padding-left: 13px;
  border-left: 1px solid #d7e2e4;
  color: #61757b;
  font-size: 12.5px;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.fe-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.fe-nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}

.fe-nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 7px;
  color: #33474d;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none !important;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.fe-nav-links a:hover,
.fe-nav-links a:focus-visible {
  background: #eff5f6;
  color: #057879;
}

.fe-nav-links a[aria-current="page"] {
  background: #eaf5f5;
  color: #057576;
  font-weight: 600;
}

.fe-nav-account {
  display: flex;
  align-items: center;
  padding-left: 12px;
  border-left: 1px solid #e3ecee;
  flex-shrink: 0;
}

/* Shared Account Menu & Login Pill */
.acct-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  background: #068f90;
  border: 1px solid #068f90;
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(6, 143, 144, 0.18);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.acct-login-btn:hover,
.acct-login-btn:focus-visible {
  background: #057879;
  border-color: #057879;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(6, 143, 144, 0.24);
}

.acct-menu {
  position: relative;
  display: inline-block;
  text-align: left;
}

.acct-trigger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  background: #f4f9f9;
  border: 1px solid #cbe2e2;
  color: #184a4f;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.acct-trigger::-webkit-details-marker {
  display: none;
}

.acct-trigger:hover,
.acct-menu[open] > .acct-trigger {
  background: #eaf5f5;
  border-color: #068f90;
  box-shadow: 0 2px 8px rgba(6, 143, 144, 0.12);
}

.acct-trigger:focus-visible {
  outline: 2px solid #068f90;
  outline-offset: 2px;
}

.acct-trigger-avatar {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #068f90 0%, #0b6d75 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.acct-online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  border: 1.5px solid #ffffff;
}

.acct-trigger-label {
  letter-spacing: 0.2px;
}

.acct-trigger-caret {
  color: #4b7277;
  transition: transform 0.16s ease;
}

.acct-menu[open] .acct-trigger-caret {
  transform: rotate(180deg);
}

.acct-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 268px;
  max-width: calc(100vw - 28px);
  background: #ffffff;
  border: 1px solid #d5e4e6;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 39, 44, 0.12), 0 2px 8px rgba(15, 39, 44, 0.05);
  z-index: 1200;
  overflow: hidden;
  text-align: left;
}

.acct-dropdown-head {
  padding: 13px 15px 12px;
  background: linear-gradient(180deg, #f5fbfb 0%, #ffffff 100%);
  border-bottom: 1px solid #e7eff0;
}

.acct-dropdown-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.acct-dropdown-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  color: #647a80;
}

.acct-dropdown-status {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: #e8f7f0;
  border: 1px solid #bce6d2;
  color: #0d6e47;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

.acct-dropdown-email {
  margin: 5px 0 0;
  font-size: 13.5px;
  font-weight: 650;
  color: #1b3339;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.acct-dropdown-links {
  padding: 6px;
  display: grid;
  gap: 2px;
}

.acct-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #243b41 !important;
  text-decoration: none !important;
  transition: background-color 0.14s ease;
}

.acct-dropdown-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #068f90;
}

.acct-dropdown-item strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #1b3339;
}

.acct-dropdown-item span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.35;
  color: #687e84;
}

.acct-dropdown-item:hover,
.acct-dropdown-item:focus-visible {
  background: #f1f8f8;
}

.acct-dropdown-item.is-active {
  background: #eaf5f5;
}

.acct-dropdown-item.is-active strong {
  color: #057576;
}

.acct-dropdown-foot {
  padding: 6px;
  border-top: 1px solid #ebf1f2;
  background: #fafcfc;
}

.acct-dropdown-foot form {
  margin: 0;
}

.acct-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #5b7076;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.acct-logout-btn:hover,
.acct-logout-btn:focus-visible {
  background: #fef2f2;
  color: #b4232c;
}

@media (max-width: 860px) {
  .fe-tagline {
    display: none;
  }
}

@media (max-width: 680px) {
  .fe-topbar {
    margin-bottom: 12px;
  }
  .fe-topbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    min-height: 0;
    padding: 10px 0 8px;
  }
  .fe-brand {
    grid-column: 1;
    grid-row: 1;
  }
  .fe-logo {
    width: 146px;
  }
  .fe-nav {
    display: contents;
  }
  .fe-nav-account {
    grid-column: 2;
    grid-row: 1;
    padding-left: 0;
    border-left: 0;
  }
  .fe-nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-left: 0;
    padding-top: 6px;
    border-top: 1px solid #ecf2f3;
    justify-content: space-between;
    gap: 2px;
  }
  .fe-nav-links a {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    font-size: 13px;
    white-space: nowrap;
  }
  .acct-trigger {
    height: 34px;
    padding: 3px 10px 3px 4px;
    font-size: 13px;
    gap: 6px;
  }
  .acct-trigger-avatar {
    width: 25px;
    height: 25px;
  }
  .acct-login-btn {
    height: 34px;
    padding: 0 13px;
    font-size: 13px;
  }
}

/* ==========================================================================
   Finish Page (/tests/figure-reasoning/finish/)
   ========================================================================== */
.finish-section {
  padding: 18px 0 12px;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

.finish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 28px;
  align-items: start;
}

.finish-main,
.finish-sidebar {
  min-width: 0;
}

.finish-card {
  background: #ffffff;
  border: 1px solid #d8e5e7;
  border-top: 4px solid #068f90;
  border-radius: 12px;
  padding: 26px 26px 24px;
  box-shadow: 0 2px 6px rgba(18, 42, 48, 0.04), 0 10px 26px rgba(18, 42, 48, 0.04);
}

.finish-card-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ebf1f2;
}

.finish-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: #e8f5f5;
  border: 1px solid #c4e3e2;
  color: #057576;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
}

.finish-title {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.35;
  color: #1b3136;
  letter-spacing: -0.2px;
}

.finish-subtitle {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #5f747a;
}

.finish-alert {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fdf3f2;
  border: 1px solid #f1c7c4;
  color: #9e2a2b;
  font-size: 13.5px;
}

.finish-alert .errorlist {
  list-style: none;
  margin: 0;
  padding: 0;
  color: inherit;
}

.finish-fields {
  display: grid;
  gap: 16px;
}

.finish-field {
  min-width: 0;
}

.finish-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 7px;
}

.finish-label {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: #21373d;
  line-height: 1.4;
}

.finish-field-hint {
  font-size: 12.5px;
  color: #6b8086;
  font-weight: 400;
}

.finish-field-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 6px;
  background: #eef6f6;
  border: 1px solid #d2e6e6;
  color: #196467;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.finish-input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 9px 14px;
  font-size: 15px;
  line-height: 1.45;
  color: #1d2f34;
  background-color: #fbfdfd;
  border: 1px solid #c6d6d9;
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(18, 42, 48, 0.02);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.finish-input::placeholder {
  color: #8ea0a6;
}

.finish-input:hover {
  border-color: #9fb8bc;
  background-color: #ffffff;
}

.finish-input:focus {
  outline: none;
  border-color: #068f90;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(6, 143, 144, 0.14);
}

.finish-input:-webkit-autofill,
.finish-input:-webkit-autofill:hover,
.finish-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #1d2f34;
  -webkit-box-shadow: 0 0 0 1000px #f4fafa inset;
  border-color: #a9cecf;
  transition: background-color 5000s ease-in-out 0s;
}

.finish-field .errorlist {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  font-size: 12.5px;
  color: #b4232c;
}

.finish-account-box {
  padding: 13px 15px;
  border-radius: 9px;
  background: #f5fafa;
  border: 1px solid #d5e7e7;
}

.finish-account-email {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: #194d52;
  overflow-wrap: anywhere;
}

.finish-privacy-note {
  margin: 15px 0 0;
  font-size: 12.5px;
  color: #74888e;
  line-height: 1.5;
}

.finish-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #ebf1f2;
}

.finish-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.finish-btn-secondary {
  background: #ffffff;
  border: 1px solid #c9d7da;
  color: #4f656b;
}

.finish-btn-secondary:hover,
.finish-btn-secondary:focus-visible {
  background: #f4f8f9;
  border-color: #aebfc3;
  color: #21373d;
}

.finish-btn-primary {
  background: #068f90;
  border: 1px solid #068f90;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(6, 143, 144, 0.2);
}

.finish-btn-primary:hover,
.finish-btn-primary:focus-visible {
  background: #057879;
  border-color: #057879;
  color: #ffffff;
}

.finish-progress-card {
  background: #fbfdfd;
  border: 1px solid #e1ecee;
  border-radius: 12px;
  padding: 22px 24px;
}

.finish-progress-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.finish-progress-title {
  font-size: 14px;
  font-weight: 650;
  color: #253d43;
  white-space: nowrap;
}

.finish-progress-line {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: #eef4f5;
}

.finish-ring-wrap {
  position: relative;
  width: 248px;
  height: 248px;
  max-width: 100%;
  margin: 4px auto 8px;
}

.finish-ring-wrap canvas.test-progress {
  display: block;
  width: 100%;
  height: 100%;
}

.finish-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.finish-ring-value {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.08;
  color: #068f90;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

.finish-ring-caption {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: #63797f;
}

.finish-notes {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid #e6eff1;
}

.finish-notes-title {
  font-size: 13.5px;
  font-weight: 650;
  color: #253d43;
  margin-bottom: 8px;
}

.finish-notes-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.65;
  color: #5d7379;
}

.finish-notes-list li + li {
  margin-top: 6px;
}

.finish-notes-list strong {
  color: #068f90;
  font-weight: 600;
}

@media (max-width: 767px) {
  .finish-section {
    padding: 10px 0 6px;
  }
  .finish-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .finish-sidebar {
    display: none !important;
  }
  .finish-card {
    padding: 20px 18px;
  }
  .finish-title {
    font-size: 19px;
  }
  .finish-actions {
    grid-template-columns: 1fr 1.25fr;
    gap: 10px;
  }
}

/* ==========================================================================
   Homepage Right Sidebar: Spacious 5 Cognitive Dimensions Section
   ========================================================================== */
.home-dim-section {
  text-align: left;
  padding: 2px 0 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e6eded;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

.home-dim-head {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  margin-bottom: 6px;
  background-color: #FFA01C;
  border-radius: 6px;
  text-align: center;
}

.home-dim-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
  text-align: center;
  letter-spacing: 0.4px;
}

.home-dim-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.home-dim-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid #eff4f5;
  line-height: 1.5;
}

.home-dim-row:last-child {
  border-bottom: 0;
}

.home-dim-index {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 22px;
  border-radius: 5px;
  background: #eaf5f5;
  color: #068f90;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.home-dim-name {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 650;
  color: #243b41;
}

.home-dim-sep {
  color: #b7c8cc;
  font-weight: 600;
}

.home-dim-summary {
  min-width: 0;
  font-size: 14px;
  color: #707d82;
}

.home-dim-note {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: #768488;
}

.home-dim-note span {
  color: #068f90;
  font-weight: 600;
}

/* Harmonize two-column widths on Desktop (>=992px) and stack smoothly on Tablet/Mobile */
@media (min-width: 992px) {
  .index_col_md > .col-md-8 {
    width: 58.5%;
    max-width: none;
  }
  .index_col_md > .col-md-4 {
    width: 41.5%;
    margin-left: 0;
    padding-left: 20px;
  }
  .index_col_md .table_body_1 {
    padding-right: 20px;
  }
  .index_col_md .table_body_2 {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 991px) {
  .index_col_md > .col-md-8,
  .index_col_md > .col-md-4 {
    max-width: none;
    margin-left: 0;
  }
  .index_col_md .table_body_1 {
    border-right: 0;
    padding-right: 0;
  }
  .index_col_md .table_body_2 {
    min-width: 0;
    width: 100%;
  }
  .home-dim-section {
    margin-top: 22px;
  }
}

@media (min-width: 600px) and (max-width: 991px) {
  .home-dim-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
  }
  .home-dim-row:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 599px) {
  .home-dim-title {
    font-size: 15.5px;
  }
  .home-dim-row {
    padding: 10px 0;
    gap: 8px;
  }
  .home-dim-name {
    font-size: 14.5px;
  }
  .home-dim-summary {
    font-size: 13.5px;
  }
}

/* ==========================================================================
   Homepage Pure-Code Vector IQ Score Distribution Chart
   ========================================================================== */
.home-iq-figure {
  margin: 0 0 14px;
  padding: 14px 12px 10px;
  background: #fbfdfd;
  border: 1px solid #e3eeef;
  border-radius: 10px;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

.home-iq-svg {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin: 0 auto;
}

.home-iq-svg-title {
  font-size: 15.5px;
  font-weight: 700;
  fill: #243b41;
}

.home-iq-span-label {
  font-size: 12px;
  font-weight: 700;
  fill: #ffffff;
  font-variant-numeric: tabular-nums;
}

.home-iq-pct {
  font-size: 12px;
  font-weight: 650;
  fill: #2c464d;
  font-variant-numeric: tabular-nums;
}

.home-iq-axis {
  font-size: 11.5px;
  font-weight: 500;
  fill: #5e747a;
  font-variant-numeric: tabular-nums;
}

.home-iq-caption {
  margin: 6px 0 0;
  text-align: center !important;
  font-size: 13.5px;
  color: #7c898d;
}

/* ==========================================================================
   Homepage Interactive & Auto-Demo Geometric Question Card
   Matches exact dimensions & visual language of real test (.test_table_body_img)
   ========================================================================== */
.home-demo-stage {
  width: 100% !important;
  max-width: 346px;
  margin: 12px auto 22px !important;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

.home-demo-card {
  width: 100%;
  background: #ffffff;
  background-clip: padding-box;
  border: 7px solid rgba(213, 213, 213, 0.5);
  border-radius: 8px;
  padding: 16px 12px 18px;
  transition: border-color 0.18s ease;
}

.home-demo-card:hover {
  border-color: rgba(213, 213, 213, 0.85);
}

/* Exact 275px 3x3 Matrix with 3px solid #333 border & borderless inner cells */
.home-demo-matrix {
  width: 275px;
  max-width: 100%;
  margin: 0 auto;
  padding: 4px 6px;
  background: #ffffff;
  border: 3px solid #333333;
  border-radius: 5px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
}

.home-demo-cell {
  width: 100%;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #141414;
  position: relative;
}

.home-demo-cell > svg {
  width: 60px;
  height: 60px;
  display: block;
}

/* Bottom-right pentagon missing-piece slot */
.home-demo-cell-target .home-demo-slot-empty {
  color: #1f1f1f;
  transition: opacity 0.2s ease;
}

.home-demo-qmark {
  position: absolute;
  margin-right: 4px;
  font-size: 24px;
  font-weight: 700;
  color: #141414;
  line-height: 1;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.home-demo-card[data-demo-state="step-2"] .home-demo-qmark {
  opacity: 0;
}

.home-demo-slot-filled {
  position: absolute;
  width: 60px;
  height: 60px;
  color: #068f90;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.home-demo-card[data-demo-state="step-3"] .home-demo-slot-empty,
.home-demo-card[data-demo-state="user-correct"] .home-demo-slot-empty,
.home-demo-card[data-demo-state="step-3"] .home-demo-qmark,
.home-demo-card[data-demo-state="user-correct"] .home-demo-qmark {
  opacity: 0;
}

.home-demo-card[data-demo-state="step-3"] .home-demo-slot-filled,
.home-demo-card[data-demo-state="user-correct"] .home-demo-slot-filled {
  opacity: 1;
  transform: scale(1);
}

/* Compact 1-line guidance strip between Matrix and Options */
.home-demo-hint {
  width: 277px;
  max-width: 100%;
  margin: 10px auto 9px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  color: #5b6d72;
  transition: color 0.18s ease;
}

.home-demo-card[data-demo-state="step-3"] .home-demo-hint,
.home-demo-card[data-demo-state="user-correct"] .home-demo-hint {
  color: #068f90;
  font-weight: 600;
}

.home-demo-card[data-demo-state="user-wrong"] .home-demo-hint {
  color: #b86204;
}

.home-demo-reset {
  flex-shrink: 0;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #cbd9dc;
  background: #ffffff;
  color: #52686e;
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
}

.home-demo-reset:hover {
  border-color: #068f90;
  color: #068f90;
}

/* Exact 277px 2x4 Pentagon Answer Tiles (60x60 each, matching .test_t_x) */
.home-demo-options {
  width: 277px;
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 60px);
  justify-content: space-between;
  row-gap: 10px;
}

.home-demo-opt {
  position: relative;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1b1b1b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.12s ease;
}

.home-demo-opt > svg {
  width: 60px;
  height: 60px;
  display: block;
}

.home-demo-opt:hover,
.home-demo-opt:focus-visible {
  outline: none;
  color: #068f90;
}

.home-demo-opt:focus-visible {
  outline: 2px solid #068f90;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Selected / Active Pentagon Tile: turns #068f90 teal just like active_sprite-a* */
.home-demo-card[data-demo-state="step-3"] .home-demo-opt[data-demo-correct="true"],
.home-demo-opt.is-selected-correct {
  color: #068f90;
}

.home-demo-opt.is-selected-wrong {
  color: #d97706;
}

/* Auto-Demo Hand/Pointer */
.home-demo-cursor {
  position: absolute;
  right: -4px;
  bottom: -10px;
  width: 26px;
  height: 26px;
  pointer-events: none;
  opacity: 0;
  transform: translate(10px, 12px);
  transition: opacity 0.25s ease, transform 0.3s ease;
  z-index: 3;
}

.home-demo-cursor svg {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.home-demo-card[data-demo-state="step-2"] .home-demo-cursor {
  opacity: 1;
  transform: translate(0, 0);
}

.home-demo-card[data-demo-state="step-3"] .home-demo-cursor {
  opacity: 1;
  transform: translate(-2px, -2px) scale(0.92);
}

.home-demo-card[data-demo-interacted="true"] .home-demo-cursor {
  display: none;
}

/* Start CTA Button aligned to exact 346px width underneath */
.home-demo-cta-group {
  display: block;
  width: 100%;
  margin-top: 14px;
}

.home-demo-cta {
  float: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  height: 50px;
  border-radius: 6px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: 0.4px;
  text-decoration: none !important;
  transition: background-color 0.16s ease, box-shadow 0.2s ease;
}

.home-demo-cta.is-ready-pulse {
  box-shadow: 0 0 0 4px rgba(255, 160, 27, 0.28);
}

@media (max-width: 360px) {
  .home-demo-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .home-demo-opt,
  .home-demo-opt > svg {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-demo-slot-empty,
  .home-demo-slot-filled,
  .home-demo-qmark,
  .home-demo-opt,
  .home-demo-cursor,
  .home-demo-cta {
    transition: none !important;
  }
}
