:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #26262b;
  background: #f5f2ee;
  font-synthesis: none;
  --muted: #7f7c80;
  --accent: #7770bd;
  --raise: 6px 8px 18px #d8d3cd99, -5px -5px 16px #ffffff;
  --inset: inset 4px 5px 12px #dad5cf99, inset -3px -3px 9px #fff;
  --viewport: 100dvh;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  border: 0;
  cursor: pointer;
  background: #faf8f5;
  box-shadow: var(--raise);
  min-height: 46px;
  border-radius: 28px;
  padding: 12px 19px;
}
button:active {
  box-shadow: var(--inset);
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #7770bd;
  outline-offset: 4px;
}
input,
textarea {
  border: 0;
  background: transparent;
  outline: none;
}
input:focus-visible,
textarea:focus-visible {
  box-shadow: inset 0 -2px #9990d2;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 36px;
  letter-spacing: -1.5px;
  font-weight: 650;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 16px;
  font-weight: 550;
}
small,
.muted {
  color: var(--muted);
}
svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.circle {
  width: 48px;
  height: 48px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
}
.primary {
  background: linear-gradient(145deg, #c0bafb, #948bda);
  color: #fff;
  box-shadow:
    inset 1px 2px 3px #fff7,
    5px 8px 16px #aca5c77a;
}
.shell {
  max-width: 1120px;
  margin: auto;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 60px;
  padding: 46px 44px;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.brand {
  margin: 4px 0 44px;
  font-size: 36px;
  font-weight: 650;
  letter-spacing: -2px;
}
.navitem {
  box-shadow: none;
  background: none;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 28px;
  color: #77737b;
}
.navitem.active {
  color: #514a8c;
  background: #e8e3f5;
  box-shadow: inset 0 1px 2px #fff;
}
.sidebar .foot {
  margin-top: auto;
  font-size: 13px;
  color: #999;
}
.main {
  min-width: 0;
  padding-bottom: 100px;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 14px;
}
.actions {
  display: flex;
  gap: 12px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #8d8794;
  margin-bottom: 9px;
}
.filters {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding: 5px 5px 18px;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.filters button {
  white-space: nowrap;
  font-size: 13px;
  min-height: 38px;
  padding: 9px 17px;
}
.filters .selected {
  background: #d5cef5;
  box-shadow: inset 1px 1px 3px #fff8;
}
.card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 26px;
  background: #fbf9f6;
  margin-bottom: 15px;
  padding: 21px;
  text-align: left;
  min-height: 94px;
  box-shadow:
    5px 8px 24px #d8d3cd66,
    -4px -4px 12px #ffffff99;
}
.orb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 2px 2px 6px #fff6;
  background: #ddd5ef;
}
.c0 {
  background: #ecc8c8;
}
.c1 {
  background: #bdd5bf;
}
.c2 {
  background: #f2dba3;
}
.c3 {
  background: #bbd8ef;
}
.c4 {
  background: #d4c8e4;
}
.cardtext {
  flex: 1;
  min-width: 0;
}
.card p {
  font-size: 13px;
  color: #827e84;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 7px;
}
.card time {
  font-size: 12px;
  color: #8d888e;
  align-self: flex-start;
  margin-top: 3px;
}
.fab {
  position: fixed;
  bottom: 42px;
  right: max(32px, calc((100vw - 1032px) / 2));
  width: 65px;
  height: 65px;
  z-index: 3;
}
.fab svg {
  width: 29px;
  height: 29px;
}
.search {
  box-shadow: var(--inset);
  background: #f2eeea;
  border-radius: 24px;
  padding: 15px 20px;
  width: 100%;
  margin-bottom: 24px;
}
.empty {
  padding: 60px 0;
  color: #938c95;
  text-align: center;
}
.listrow {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  background: none;
  box-shadow: none;
  padding: 20px 4px;
  text-align: left;
}
.listrow .grow {
  flex: 1;
}
.count {
  font-size: 13px;
  color: #918a94;
}
.editor {
  position: fixed;
  inset: 0;
  height: var(--viewport);
  top: var(--offset, 0px);
  background: #f5f2ee;
  z-index: 5;
  overflow: auto;
  padding: max(24px, env(safe-area-inset-top))
    max(24px, calc((100vw - 760px) / 2)) 24px;
  display: flex;
  flex-direction: column;
}
.editorbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 34px;
}
.editmeta {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.titleblock {
  flex: 1;
  min-width: 0;
}
.title {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1px;
  width: 100%;
  padding: 4px 0;
  margin-bottom: 10px;
}
.date {
  font-size: 13px;
  color: #969096;
}
.assigned {
  max-width: 42%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 8px;
}
.chip {
  font-size: 12px;
  padding: 8px 11px;
  min-height: 32px;
  box-shadow: none;
  background: #e6e9df;
}
.editing {
  display: flex;
  flex: 1;
  gap: 16px;
  min-height: 200px;
  margin-top: 26px;
  position: relative;
}
.bodywrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  box-shadow: var(--inset);
  border-radius: 27px;
  padding: 21px;
  background: #f1eeea;
}
.bodyinput {
  resize: none;
  width: 100%;
  flex: 1;
  min-height: 180px;
  line-height: 1.65;
  font-size: 17px;
  padding: 0;
}
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: sticky;
  top: 20px;
  align-self: flex-start;
}
.toolbar .circle {
  width: 46px;
  height: 46px;
}
.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.attachment {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  font-size: 12px;
}
.attachment a {
  color: #62558e;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.attachment img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 14px;
}
.attachment button {
  min-height: 28px;
  width: 28px;
  padding: 0;
  box-shadow: none;
}
.linked {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.linked button {
  box-shadow: none;
  background: #e5dff2;
  font-size: 12px;
  padding: 6px 10px;
  min-height: 30px;
}
dialog {
  border: 0;
  border-radius: 30px;
  background: #f5f2ee;
  color: #26262b;
  max-width: 420px;
  width: calc(100% - 32px);
  padding: 25px;
  box-shadow: 0 20px 70px #34303b33;
  max-height: 80dvh;
}
dialog::backdrop {
  background: #312c3a40;
  backdrop-filter: blur(5px);
}
.dialoghead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dialoglist {
  max-height: 43dvh;
  overflow: auto;
}
.dialoglist button {
  width: 100%;
  text-align: left;
  box-shadow: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
}
.dialoglist button.chosen {
  background: #e6e0f4;
}
.formfield {
  width: 100%;
  padding: 16px;
  border-radius: 20px;
  box-shadow: var(--inset);
  margin: 8px 0 17px;
}
.formactions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
#status {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #37323d;
  color: white;
  border-radius: 22px;
  padding: 0;
  z-index: 20;
  max-width: 90%;
  font-size: 13px;
}
#status:not(:empty) {
  padding: 14px 20px;
}
.sectiontitle {
  margin: 26px 0 18px;
  color: #78717d;
  font-size: 13px;
  font-weight: 500;
}
.delete {
  color: #a75060;
}
.offline {
  font-size: 11px;
  color: #91899c;
}
label {
  font-size: 14px;
}
@media (max-width: 700px) {
  .shell {
    display: block;
    padding: 40px 23px 110px;
  }
  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    flex-direction: row;
    justify-content: space-around;
    background: #f5f2eeed;
    backdrop-filter: blur(16px);
    padding: 12px 8px max(14px, env(safe-area-inset-bottom));
    gap: 2px;
  }
  .brand,
  .sidebar .foot {
    display: none;
  }
  .navitem {
    flex-direction: column;
    gap: 5px;
    font-size: 10px;
    padding: 9px 11px;
    border-radius: 20px;
    min-width: 54px;
  }
  .navitem svg {
    width: 21px;
    height: 21px;
  }
  .heading {
    margin-bottom: 26px;
  }
  h1 {
    font-size: 34px;
  }
  .card {
    padding: 19px 16px;
    gap: 14px;
    min-height: 88px;
  }
  .card h3 {
    font-size: 15px;
  }
  .card time {
    font-size: 11px;
  }
  .fab {
    bottom: 107px;
    right: 25px;
  }
  .editor {
    padding: 24px 20px max(20px, env(safe-area-inset-bottom));
  }
  .editorbar {
    margin-bottom: 25px;
  }
  .title {
    font-size: 28px;
  }
  .editing {
    gap: 12px;
  }
  .bodywrap {
    padding: 19px 17px;
  }
  .toolbar .circle {
    width: 43px;
    height: 43px;
  }
  .assigned {
    max-width: 40%;
  }
  .eyebrow {
    font-size: 10px;
  }
  .editor .date {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background 0.15s,
      transform 0.15s;
  }
  button:active {
    transform: translateY(1px);
  }
}

/* Refinements retain the original surfaces, shadows and type scale. */
[hidden] {
  display: none !important;
}
.detailtitle {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.detailtitle h1 {
  overflow-wrap: anywhere;
  min-width: 0;
}
.heading .actions {
  flex-shrink: 0;
}
.avatar {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e5e2df;
  color: #a5a0a6;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-orientation: from-image;
}
.avatar svg {
  width: 24px;
  height: 24px;
}
.profile-avatar {
  width: 44px;
  height: 44px;
}
.unassigned-topic {
  background: #fff;
  box-shadow:
    1px 2px 7px #cfc7c66b,
    inset -1px -1px 2px #eee9e6;
}
.notetitle {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.notetitle h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.paperclip {
  display: inline-flex;
  color: #8c878c;
  flex-shrink: 0;
}
.paperclip svg {
  width: 15px;
  height: 15px;
}
.studentpills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.studentpills span {
  background: #eeebe8;
  color: #77717a;
  font-size: 11px;
  padding: 4px 7px;
  border-radius: 20px;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sectiontabs,
.categoryfilters {
  display: flex;
  gap: 10px;
  margin: 0 0 25px;
  flex-wrap: wrap;
}
.sectiontabs button,
.categoryfilters button {
  font-size: 13px;
  padding: 10px 16px;
}
.selected {
  background: #d5cef5;
  box-shadow: inset 1px 1px 3px #fff8;
}
.searchrow {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.searchrow .search {
  flex: 1;
  min-width: 0;
}
.searchrow .circle {
  box-shadow: none;
  background: transparent;
}
.filters {
  padding: 22px 24px 25px;
  margin: -12px -24px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-padding-inline: 24px;
}
.fab {
  z-index: 4;
}
.editmeta {
  align-items: flex-start;
  flex-shrink: 0;
}
.editmeta > .circle {
  width: 44px;
  height: 44px;
  margin-top: 1px;
}
.editor {
  overflow: hidden;
}
.title {
  margin-bottom: 4px;
}
.date {
  font-size: 12px;
  line-height: 1.5;
  display: block;
  text-align: left;
  padding: 3px 0;
  min-height: 32px;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: #969096;
}
.assigned {
  max-width: 35%;
  max-height: 82px;
  overflow-y: auto;
  padding: 4px 2px;
}
.chip {
  background: #eae7e4;
  color: #777078;
}
.editing {
  min-height: 0;
  margin-top: 20px;
}
.bodywrap {
  min-height: 0;
  overflow-y: auto;
}
.bodyinput {
  min-height: 128px;
  flex: 1 0 128px;
}
.bodyinput:focus-visible {
  box-shadow: none;
  background: #ffffff26;
}
.toolbar {
  position: relative;
  top: 0;
  align-self: stretch;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  width: 70px;
  padding: 10px 12px 20px;
  margin: -10px -12px -20px 0;
  gap: 10px;
}
.toolbar .circle {
  flex-shrink: 0;
  min-height: 44px;
  width: 44px;
  height: 44px;
}
.topic-tool {
  position: relative;
}
.tool-topic {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
}
.linked {
  flex-shrink: 0;
  max-height: 70px;
  overflow: auto;
  padding: 4px 0;
  margin-top: 10px;
}
.attachments {
  padding: 8px 4px;
  gap: 18px;
  flex-shrink: 0;
}
.attachment {
  position: relative;
  display: block;
  max-width: 100%;
  margin-right: 4px;
}
.attachment-open {
  min-height: 60px;
  padding: 12px 17px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  box-shadow: none;
  background: #e7e2df;
  font-size: 12px;
}
.image-attachment .attachment-open {
  padding: 0;
  background: transparent;
  border-radius: 17px;
}
.attachment img {
  display: block;
  width: 100px;
  height: 100px;
  border-radius: 17px;
  object-fit: cover;
  image-orientation: from-image;
}
.attachment .remove-attachment {
  position: absolute;
  right: -10px;
  top: -10px;
  min-height: 32px;
  width: 32px;
  height: 32px;
  box-shadow: var(--raise);
  background: #faf8f5;
}
.remove-attachment svg {
  width: 14px;
  height: 14px;
}
.dialoglist button {
  position: relative;
  min-height: 64px;
  padding: 12px 19px;
  isolation: isolate;
}
.dialoglist button > * {
  position: relative;
  z-index: 1;
}
.dialoglist button.chosen {
  background: transparent;
}
.dialoglist button.chosen::before {
  content: "";
  position: absolute;
  inset: 7px 0;
  background: #e6e0f4;
  border-radius: 28px;
  z-index: 0;
}
.dialoglist button:focus-visible {
  outline-offset: -3px;
}
.validation {
  font-size: 13px;
  color: #a75060;
  margin-bottom: 12px;
}
.validation:empty {
  display: none;
}
select {
  font: inherit;
  color: inherit;
  border: 0;
  background: #f2eeea;
  outline-offset: 2px;
}
.photoactions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 22px;
}
.photoactions button {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.colours {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0 20px;
}
.colours button {
  position: relative;
  background: transparent;
  box-shadow: none;
  width: 48px;
  height: 48px;
}
.colours .orb {
  width: 40px;
  height: 40px;
}
.colours svg {
  position: absolute;
  color: #57505f;
}
.colour-control {
  box-shadow: none;
  background: transparent;
}
#cropcanvas {
  display: block;
  width: min(256px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 20px;
  border-radius: 50%;
  touch-action: none;
  cursor: move;
}
.croprange {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
  margin: 12px 0;
}
input[type="range"] {
  accent-color: #948bda;
  min-height: 32px;
  min-width: 0;
}
.croprange input {
  width: 65%;
}
.viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  border-radius: 0;
  padding: max(18px, env(safe-area-inset-top)) 20px
    max(20px, env(safe-area-inset-bottom));
  background: #f5f2ee;
  overflow: hidden;
}
.viewer[open] {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.viewerbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
}
.viewerbar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.download {
  color: #7768a9;
  font-size: 13px;
}
.viewer-stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-x pan-y pinch-zoom;
}
.viewer-stage.zoomed {
  display: block;
}
.fullimage {
  display: block;
  max-width: 100%;
  height: auto;
  flex-shrink: 0;
  image-orientation: from-image;
}
.viewer-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
}
.viewer-stage pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  align-self: flex-start;
  width: 100%;
  font: inherit;
  line-height: 1.6;
}
.zoomcontrol {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  flex-shrink: 0;
}
.zoomcontrol input {
  width: 180px;
}
.previewerror {
  font-size: 13px;
  text-align: center;
}
@media (max-width: 700px) {
  .fab {
    bottom: calc(116px + env(safe-area-inset-bottom));
  }
  .sidebar {
    z-index: 3;
  }
  .editor {
    padding: max(20px, env(safe-area-inset-top)) 18px
      max(16px, env(safe-area-inset-bottom));
  }
  .editmeta {
    gap: 9px;
  }
  .title {
    font-size: 26px;
  }
  .editor .date {
    font-size: 10px;
  }
  .assigned {
    max-width: 34%;
  }
  .chip {
    font-size: 10px;
    padding: 7px 9px;
    min-height: 29px;
  }
  .editing {
    gap: 10px;
    margin-top: 16px;
  }
  .toolbar {
    width: 68px;
  }
  .detailtitle {
    gap: 9px;
  }
  .heading:has([data-action="back"]) .detailtitle h1 {
    font-size: 28px;
  }
  .detailtitle .circle {
    width: 42px;
    height: 42px;
  }
  .profile-avatar {
    width: 34px;
    height: 34px;
  }
  .heading .actions {
    gap: 10px;
  }
}
@media (forced-colors: active) {
  .bodyinput:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
}
.attachment .attachment-open {
  width: auto;
  min-width: 100px;
  min-height: 60px;
  padding: 12px 17px;
  box-shadow: none;
}
.image-attachment .attachment-open {
  padding: 0;
}
.remove-attachment::before {
  content: "";
  position: absolute;
  inset: -6px;
}

.assigned {
  max-height: 116px;
}
@media (max-width: 700px) {
  .assigned {
    max-height: 107px;
  }
}
@media (max-height: 500px) {
  .assigned {
    max-height: 72px;
  }
}
@media (max-width: 700px) {
  .filters {
    margin-inline: -23px;
    padding-inline: 23px;
  }
}
