/* Opt-in tactile surfaces. Text remains in a 2D plane for sharp rendering. */
.spatial-preview {
  --blue: #333;
}
.spatial-preview .feature-panel .feature-visual {
  background: #f0f0f0;
}
.spatial-preview .motion-film {
  box-shadow:
    0 0 0 6px #2c2c2c,
    0 25px 45px -22px #22222260;
}
.spatial-preview .film-note {
  color: #707070;
}
.spatial-card-motion {
  display: block;
  border-radius: inherit;
}
.spatial-card-face {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 178px;
  border: 1px solid #e1e1e18c;
  background: linear-gradient(142deg, #fff 8%, #fafafa 68%, #efefef);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 #dfdfdf66,
    0 2px 3px #32323208,
    0 7px 12px -9px #32323230,
    0 28px 38px -25px #2e2e2e54;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.35s,
    border-color 0.35s;
}
.spatial-card-face::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at var(--light-x, 35%) var(--light-y, 25%),
    #fff 0,
    #ffffff00 68%
  );
  transition: opacity 0.4s;
}
.spatial-card.is-selected .spatial-card-face {
  background: linear-gradient(142deg, #fff 8%, #f9f9f9 68%, #ececec);
  border-color: #bbbbbb;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 #cfcfcf,
    0 3px 5px #3232320b,
    0 28px 42px -24px #2e2e2e6b;
}
.spatial-card:hover .spatial-card-face {
  transform: translateY(-5px);
  box-shadow:
    inset 0 1px 0 #fff,
    0 8px 14px -10px #32323230,
    0 32px 46px -24px #2e2e2e70;
}
.spatial-card:hover .spatial-card-face::after {
  opacity: 0.8;
}
.spatial-card-heading {
  gap: 8px;
  color: #636363;
}
.spatial-card-heading > svg {
  transition: transform 0.3s;
}
.spatial-card:hover .spatial-card-heading > svg {
  transform: translate(2px, -2px);
}
.spatial-card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 6px;
  background: #eaeaea;
  color: #707070;
  font-size: 9px;
  transition:
    color 0.3s,
    background 0.3s;
}
.spatial-card.is-selected .spatial-card-index {
  background: #494949;
  color: #fff;
}
.spatial-course .spatial-card-face {
  border-left: 3px solid #b0b0b0;
}
.spatial-course-name {
  margin-top: 14px;
  letter-spacing: -1.2px;
}
.spatial-course-time {
  border-color: #d3d3d3;
  padding-top: 11px;
}
.spatial-wave {
  position: relative;
  gap: 3px;
}
.spatial-wave::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: #a8a8a833;
}
.spatial-wave i {
  width: 2.5px;
  z-index: 1;
  transform-origin: center;
  background: linear-gradient(#878787, #505050);
}
.spatial-question-text {
  color: #282828;
  font-weight: 550;
}
.spatial-source {
  gap: 6px;
  color: #6e6e6e;
}
.spatial-source svg {
  width: 17px;
  height: 17px;
}
.spatial-review-kit {
  display: flex;
  position: relative;
  height: 61px;
  margin: 19px 0 15px;
  align-items: center;
  justify-content: center;
}
.spatial-review-kit > span {
  width: 43px;
  height: 53px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  background: linear-gradient(145deg, #fff, #ececec);
  box-shadow: 0 5px 8px -6px #2d2d2d70;
  margin-left: -7px;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.spatial-review-kit > span:nth-child(1) {
  transform: rotate(-13deg) translateY(3px);
}
.spatial-review-kit > span:nth-child(2) {
  transform: rotate(-4deg) translateY(-2px);
}
.spatial-review-kit > span:nth-child(3) {
  transform: rotate(5deg) translateY(-1px);
}
.spatial-review-kit > span:nth-child(4) {
  transform: rotate(13deg) translateY(4px);
}
.spatial-review-kit svg {
  width: 24px;
  height: 24px;
  color: #5d5d5d;
}
.spatial-review-kit .kit-letters {
  font-family: Georgia, serif;
  font-size: 20px;
  color: #5d5d5d;
}
.spatial-recall:hover .spatial-review-kit > span:nth-child(1),
.spatial-recall.is-selected .spatial-review-kit > span:nth-child(1) {
  transform: rotate(-19deg) translate(-6px, 2px);
}
.spatial-recall:hover .spatial-review-kit > span:nth-child(4),
.spatial-recall.is-selected .spatial-review-kit > span:nth-child(4) {
  transform: rotate(19deg) translate(6px, 3px);
}
@keyframes sample-wave {
  from {
    transform: scaleY(0.5);
  }
  to {
    transform: scaleY(1);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .is-motion-active .spatial-recording.is-selected .spatial-wave i {
    animation: sample-wave 1.1s var(--wave-delay) ease-in-out infinite alternate;
  }
}
@media (max-height: 820px) and (min-width: 621px) {
  .spatial-question {
    transform: translate(-260px, 78px) rotate(4deg);
  }
  .spatial-recall {
    transform: translate(260px, 83px) rotate(-6deg);
  }
  .spatial-footer {
    bottom: 42px;
  }
}
@media (max-width: 960px) and (min-width: 621px) {
  .spatial-card-face {
    padding: 15px;
    min-height: 166px;
  }
  .spatial-card-heading {
    gap: 5px;
    font-size: 10px;
  }
  .spatial-card-index {
    width: 18px;
    height: 18px;
  }
  .spatial-review-kit > span {
    width: 37px;
  }
}
@media (max-height: 820px) and (max-width: 960px) and (min-width: 761px) {
  .spatial-question {
    transform: translate(-224px, 78px) rotate(4deg);
  }
  .spatial-recall {
    transform: translate(224px, 83px) rotate(-6deg);
  }
}
@media (max-height: 820px) and (max-width: 760px) and (min-width: 621px) {
  .spatial-question {
    transform: translate(-200px, 78px) rotate(3deg);
  }
  .spatial-recall {
    transform: translate(200px, 83px) rotate(-3deg);
  }
}
@media (max-width: 620px) {
  .spatial-card-face {
    min-height: 54px;
    height: 54px;
    padding: 10px;
  }
  .spatial-card-index {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }
  .spatial-card-heading {
    gap: 5px;
    font-size: 11px;
  }
  .spatial-card-face > :not(.spatial-card-heading) {
    display: none;
  }
  .spatial-course .spatial-card-face {
    border-left-width: 2px;
  }
}

/* Readable source excerpts replace the abstract orbit diagram. */
.spatial-preview .ai-section {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
  padding-top: 120px;
  padding-bottom: 120px;
}
.context-workspace {
  min-width: 0;
  width: 100%;
  max-width: 620px;
  margin: auto;
}
.context-scene {
  position: relative;
  padding-top: 28px;
}
.context-folder {
  position: absolute;
  top: 0;
  left: 12px;
  right: 40px;
  height: 345px;
  border-radius: 18px;
  background: linear-gradient(145deg, #e1e1e1, #cacaca);
  border: 1px solid #cccccc;
  transform: rotate(-3deg);
  box-shadow: 0 12px 30px -24px #39393970;
}
.context-folder::after {
  content: "";
  position: absolute;
  inset: 7px 7px -5px;
  border-radius: 15px;
  background: #f0f0f0;
  border: 1px solid #d9d9d9;
}
.context-folder > span {
  position: absolute;
  top: -13px;
  left: 20px;
  font-size: 10px;
  letter-spacing: 0.8px;
  font-weight: 600;
  padding: 6px 18px 9px;
  border-radius: 9px 9px 0 0;
  background: #e1e1e1;
  border: 1px solid #cccccc;
  border-bottom: 0;
}
.context-paper {
  position: relative;
  margin: 0 38px 0 24px;
  min-height: 379px;
  padding: 27px 30px 24px;
  border-radius: 14px;
  border: 1px solid #e2e2e2;
  background: linear-gradient(130deg, #fff, #fefefe);
  box-shadow:
    inset 0 1px 0 #fff,
    0 2px 3px #1f1f1f08,
    0 22px 38px -29px #36363665;
}
.context-paper-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 9px;
  letter-spacing: 1px;
  color: #707070;
}
.context-course-code {
  letter-spacing: 0.8px;
  font-weight: 650;
  color: #5e5e5e;
}
.context-paper h3 {
  font-size: 22px;
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -0.65px;
  margin-top: 16px;
}
.context-excerpt {
  display: grid;
  margin-top: 25px;
  min-height: 204px;
}
.context-document {
  grid-area: 1 / 1;
  min-width: 0;
  visibility: hidden;
  pointer-events: none;
}
.context-document.is-active {
  visibility: visible;
  pointer-events: auto;
}
.context-excerpt h4 {
  font-size: 12px;
  font-weight: 650;
  margin: 0 0 13px;
  color: #545454;
}
.context-excerpt p {
  font-size: 13px;
  line-height: 1.8;
  color: #747474;
  margin-top: 13px;
}
.context-excerpt mark {
  color: #464646;
  padding: 2px 1px;
  background: linear-gradient(#ededed, #ededed) left center / 100% 100%
    no-repeat;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.context-paper-footer {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #707070;
  border-top: 1px solid #ececec;
  padding-top: 14px;
  margin-top: 19px;
}
.context-note-term {
  font-size: 19px !important;
  color: #3b3b3b !important;
  font-weight: 550;
  letter-spacing: -0.3px;
}
.context-note-margin {
  border-left: 2px solid #dbdbdb;
  padding-left: 12px;
  font-style: italic;
}
.context-file-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 650;
  color: #737373;
  margin: 10px 0 15px;
}
.context-file-label > span {
  color: #818181;
  font-weight: 400;
  font-size: 11px;
}
.context-answer {
  position: relative;
  z-index: 1;
  margin: -12px 0 0 64px;
  padding: 24px;
  border: 1px solid #444444;
  border-radius: 18px;
  background: linear-gradient(145deg, #363636, #282828);
  color: #f5f5f5;
  box-shadow:
    inset 0 1px 0 #ffffff14,
    0 3px 4px #23232314,
    0 24px 35px -24px #23232380;
}
.context-answer-heading {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.5;
}
.context-answer-heading img {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 8px;
}
.context-answer > p {
  font-size: 13px;
  line-height: 1.75;
  color: #cecece;
  margin-top: 13px;
}
.context-source-heading {
  margin-top: 21px;
  margin-bottom: 9px;
  font-size: 10px;
  color: #b6b6b6;
}
.context-source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.context-source-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #5f5f5f;
  border-radius: 8px;
  background: #ffffff05;
  color: #e5e5e5;
  font-size: 11px;
  transition:
    background 0.25s,
    color 0.25s,
    transform 0.25s,
    border-color 0.25s;
}
.context-source-tabs button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.context-source-tabs button .source-ref {
  font-size: 9px;
  opacity: 0.55;
  margin-left: 2px;
}
.context-source-tabs button[aria-selected="true"] {
  background: #f0f0f0;
  border-color: #f0f0f0;
  color: #404040;
  box-shadow: 0 2px 3px #0002;
}
.context-source-tabs button:hover {
  transform: translateY(-2px);
  border-color: #bdbdbd;
}
.context-source-tabs button:focus-visible {
  outline-color: #fff;
}
.context-workspace-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 0 25px;
  color: #707070;
  font-size: 10px;
}
.context-workspace-footer a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  text-decoration: none;
  color: #545454;
  font-size: 11px;
}
.context-workspace-footer svg {
  width: 16px;
  height: 16px;
}
@media (max-width: 1100px) {
  .spatial-preview .ai-section {
    gap: 36px;
  }
  .context-paper {
    margin-right: 18px;
    margin-left: 14px;
    padding: 24px;
  }
  .context-answer {
    margin-left: 35px;
    padding: 21px;
  }
}
@media (max-width: 850px) {
  .spatial-preview .ai-section {
    grid-template-columns: 1fr;
    gap: 46px;
  }
  .context-workspace {
    max-width: 580px;
  }
}
@media (max-width: 620px) {
  .spatial-preview .ai-section {
    padding-top: 86px;
    padding-bottom: 80px;
    gap: 36px;
  }
  .context-workspace {
    padding: 0;
  }
  .context-folder {
    right: 20px;
    left: 2px;
  }
  .context-paper {
    margin-left: 10px;
    margin-right: 10px;
    padding: 22px;
    min-height: 387px;
  }
  .context-paper-top {
    font-size: 8px;
    letter-spacing: 0.5px;
  }
  .context-paper h3 {
    font-size: 21px;
  }
  .context-excerpt {
    min-height: 214px;
  }
  .context-excerpt p {
    font-size: 13px;
    line-height: 1.8;
  }
  .context-answer {
    margin-left: 16px;
    padding: 20px;
    border-radius: 15px;
  }
  .context-answer-heading {
    font-size: 14px;
    gap: 9px;
  }
  .context-source-tabs {
    gap: 6px;
  }
  .context-source-tabs button {
    min-height: 44px;
    padding: 7px 9px;
  }
  .context-workspace-footer {
    padding-left: 12px;
    gap: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .spatial-card-face,
  .spatial-review-kit > span,
  .spatial-card-heading > svg,
  .context-source-tabs button {
    transition: none;
  }
  .spatial-card:hover .spatial-card-face,
  .context-source-tabs button:hover {
    transform: none;
  }
}
