/* Official transparent logo, midnight sky, and tactile personal cards. */
.official-brand-logo {
  display: block;
  width: 240px;
  height: auto;
  aspect-ratio: 3.548;
}
.white-logo {
  overflow: visible;
  filter: brightness(0) invert(1);
}
.colour-logo {
  isolation: isolate;
}
.space-introduction > .official-brand-logo {
  width: clamp(230px, 21vw, 320px);
  margin-bottom: 32px;
}
.immersive-space .space-introduction .welcome-brand {
  color: #a6bfd0;
}
:root[data-theme="dark"] .immersive-space .space-introduction h2 span,
.immersive-space .space-introduction h2 span {
  color: #a4cee8;
}
:root[data-theme="dark"] .immersive-space .sign-in-window {
  background: linear-gradient(140deg, #183245bb, #10212faa);
  border-color: #aac8e34d;
}
:root[data-theme="dark"] .immersive-space .space-login-form :is(input, select) {
  background: #102131aa;
  border-color: #68829899;
}
:root[data-theme="dark"]
  .immersive-space
  :is(
    .welcome-description,
    .welcome-help,
    .welcome-window-footer,
    .welcome-brand
  ) {
  color: #b7ccdc;
}
.immersive-space .sign-in-window {
  background: linear-gradient(140deg, #ffffffd9, #e8f3f8c9);
  backdrop-filter: blur(28px) saturate(1.25);
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
}
.immersive-space .welcome-topline .official-brand-mark {
  width: 46px;
  height: 42px;
}
.space-theme-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 99px;
  border: 1px solid #bfc4cc;
  background: #ffffff70;
  color: #24435b;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: inset 0 1px 0 #fff7;
  transition:
    color 180ms ease,
    background 180ms ease;
}
:root[data-theme="dark"] .space-theme-button {
  background: #d3e8fc14;
  border-color: #b8d8ec38;
  color: #e3f3ff;
}
.space-theme-button:hover {
  background: #9acfff24;
}
.space-theme-button .icon {
  width: 22px;
  height: 22px;
}
.space-theme-button:focus-visible {
  outline: 2px solid #72c6ff;
  outline-offset: 4px;
}
.glass-workspace .workspace-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  margin: 0;
  padding: 18px clamp(24px, 3.4vw, 64px);
  min-height: 100px;
  background: color-mix(in srgb, var(--page) 91%, transparent);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 6px 22px #14283b05;
  align-self: start;
}
.glass-workspace .brand-lockup .official-brand-logo {
  width: clamp(190px, 16vw, 240px);
}
.brand-lockup::after {
  display: none;
}
.header-white-logo {
  display: none;
}
:root[data-theme="dark"] .brand-lockup > .colour-logo {
  display: none;
}
:root[data-theme="dark"] .header-white-logo {
  display: block;
}
.glass-workspace .workspace {
  scroll-padding-top: 116px;
}
.glass-workspace.app-shell {
  scroll-padding-top: 116px;
}
@media (min-width: 1025px) and (min-height: 601px) and (pointer: fine) {
  .glass-workspace .workspace-bar {
    grid-column: 1 / -1;
  }
}
@media (max-width: 600px) {
  .glass-workspace .workspace-bar {
    min-height: 80px;
    padding: 14px 16px;
    gap: 12px;
  }
  .glass-workspace .brand-lockup .official-brand-logo {
    width: clamp(136px, 34vw, 182px);
  }
  .glass-workspace .brand-capsule {
    gap: 12px;
  }
  .glass-workspace .brand-product {
    font-size: 10px;
    padding-left: 10px;
    letter-spacing: 0.06em;
  }
}
@media (max-width: 360px) {
  .glass-workspace .brand-product {
    display: none;
  }
}
.space-preview-card.flip-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #1c3c55;
  text-align: left;
  display: block;
  min-height: 250px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.flip-card-inner {
  display: grid;
  width: 100%;
  min-height: inherit;
  transform-style: preserve-3d;
  transition: transform 680ms cubic-bezier(0.2, 0.75, 0.25, 1);
}
.flip-card[data-flipped="true"] .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-face {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid #ffffff30;
  background: #e7f1f8;
  box-shadow:
    inset 0 1px #fff8,
    0 18px 30px #0003;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-face > .icon {
  width: 24px;
  height: 24px;
}
.flip-face small {
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.09em;
}
.flip-face strong {
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.card-detail {
  font-size: 13px;
  line-height: 1.5;
}
.flip-hint {
  margin-top: auto;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.8;
  padding-top: 10px;
}
.flip-hint > span {
  font-size: 22px;
}
.flip-back {
  transform: rotateY(180deg);
}
.card-quote {
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.practise-preview {
  --float-rest: -14px;
  color: #e7faff !important;
}
.practise-preview .flip-face {
  background: #0c526e;
  box-shadow:
    inset 0 1px #fff2,
    0 18px 30px #0003;
}
.grow-preview .flip-face {
  background: #d6e4e8;
}
.immersive-space[data-motion="on"] .practise-preview {
  animation-delay: -2.4s;
  animation-duration: 8s;
}
.immersive-space[data-motion="on"] .grow-preview {
  animation-delay: -4.7s;
  animation-duration: 9s;
}
.quote-editor {
  border: 0;
  padding: 0;
  margin: 24px 0;
  min-width: 0;
  display: grid;
  gap: 18px;
}
.quote-editor label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
}
.quote-editor :is(select, textarea) {
  width: 100%;
  max-width: 100%;
  font-size: 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.quote-editor select {
  text-overflow: ellipsis;
  /* The shorthand above removes the shared chevron; restore it so the field reads as a dropdown. */
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232a4055' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
}
:root[data-theme="dark"] .quote-editor select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23b9e5fb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
}
.quote-add {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: grid;
  gap: 14px;
  background: var(--surface-soft);
}
.personal-quote-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.personal-quote-list li {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.personal-quote-list li > span {
  flex: 1;
  overflow-wrap: anywhere;
}
.personal-quote-list small {
  display: block;
  text-transform: capitalize;
  color: var(--muted);
  margin-bottom: 6px;
}
.quote-preview {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.quote-preview dl {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}
.quote-preview dt {
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 5px;
}
.quote-preview dd {
  margin: 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.assignment-pagination > span {
  white-space: nowrap;
}
.account-card-settings {
  width: 100%;
  margin-top: 14px;
  justify-content: flex-start;
}
@media (min-width: 720px) and (max-width: 1100px) {
  .space-preview-cards {
    gap: 28px;
  }
  .practise-preview {
    --float-rest: 0px;
  }
  .space-preview-card.flip-card {
    width: 100%;
    min-height: 155px;
  }
  .flip-face {
    padding: 16px 18px;
    gap: 8px;
  }
  .flip-front {
    display: grid;
    grid-template-columns: 24px 1fr;
    column-gap: 14px;
  }
  .flip-front > .icon {
    grid-row: 1 / 3;
  }
  .flip-front :is(small, strong, .flip-hint) {
    grid-column: 2;
  }
  .flip-front .card-detail {
    display: none;
  }
  .space-introduction > .official-brand-logo {
    width: min(260px, 100%);
  }
}
@media (max-width: 719px) {
  .space-introduction > .official-brand-logo {
    width: 240px;
    margin: 0 0 26px;
  }
  .space-preview-cards {
    flex-direction: column;
    gap: 18px;
  }
  .space-preview-card.flip-card {
    width: 100%;
    min-height: 215px;
  }
  .flip-face {
    padding: 20px;
    gap: 12px;
  }
  .flip-face strong {
    font-size: 20px;
  }
  .card-quote {
    font-size: 18px;
  }
  .practise-preview {
    --float-rest: 0px;
  }
}
:root[data-motion="off"] .flip-card-inner {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .flip-card-inner,
  .theme-toggle-thumb {
    transition: none;
  }
}
:root[data-glass="off"] .glass-workspace .workspace-bar {
  background: var(--page);
  backdrop-filter: none;
}
@media (prefers-reduced-transparency: reduce) {
  .glass-workspace .workspace-bar {
    background: var(--page);
    backdrop-filter: none;
  }
}

/* Live preview inside Personalize: reads the same tokens the workspace uses. */
.appearance-preview {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--page, var(--surface-soft));
  overflow: hidden;
  margin: 4px 0 18px;
  transition: background 0.2s, border-color 0.2s;
}
.appearance-preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
:root:not([data-glass="off"]) .appearance-preview-bar {
  background: var(--dock-glass, var(--surface));
  backdrop-filter: blur(10px);
}
.appearance-preview-logo {
  width: 22px;
  height: 14px;
  border-radius: 4px;
  background: var(--blue);
}
.appearance-preview-avatar {
  width: 18px;
  height: 18px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--blue);
}
.appearance-preview-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 12px;
  padding: 14px;
}
:root[data-density="compact"] .appearance-preview-body {
  gap: 7px;
  padding: 8px;
}
.appearance-preview-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 12.5px;
}
:root[data-density="compact"] .appearance-preview-card {
  padding: 7px 9px;
  gap: 5px;
}
.appearance-preview-card.soft {
  background: var(--surface-soft);
}
.appearance-preview-eyebrow {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue);
}
.appearance-preview-line {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
}
.appearance-preview-line.short {
  width: 45%;
}
.appearance-preview-button {
  justify-self: start;
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--blue);
  color: var(--surface);
  font-size: 11px;
  font-weight: 650;
}
.appearance-preview-chip {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft, var(--surface-soft));
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 650;
}
.appearance-preview-dock {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 8px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
:root:not([data-glass="off"]) .appearance-preview-dock {
  background: var(--dock-glass, var(--surface));
}
.appearance-preview-dock span {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: var(--border);
}
.appearance-preview-dock span.active {
  background: var(--blue);
}
@media (prefers-reduced-motion: reduce) {
  .appearance-preview {
    transition: none;
  }
}
:root[data-motion="off"] .appearance-preview {
  transition: none;
}
