:root {
  color-scheme: light;
  --bg: #f8f9f5;
  --surface: #fff;
  --text: #263e35;
  --muted: #65746b;
  --primary: #226449;
  --primary-hover: #184b36;
  --primary-soft: #edf5ed;
  --border: #e2e8de;
  --hero: #e9f1e4;
  --hero-ink: #244e37;
  --mint: #e6f2e8;
  --peach: #fcf0e4;
  --lilac: #efedf9;
  --peach-ink: #926032;
  --lilac-ink: #7565a5;
  --shadow: 0 4px 20px #203e2b04;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141e1a;
  --surface: #1c2922;
  --text: #e0e9df;
  --muted: #a2b1a6;
  --primary: #93cba6;
  --primary-hover: #b2dfbf;
  --primary-soft: #2b4132;
  --border: #314036;
  --hero: #2a3e2c;
  --hero-ink: #deecd6;
  --mint: #2b4132;
  --peach: #40372a;
  --lilac: #343146;
  --peach-ink: #e4bb88;
  --lilac-ink: #c0b4e9;
  --shadow: 0 4px 20px #0000000a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: var(--primary);
}
button,
a,
input,
textarea,
select {
  transition:
    background 0.18s,
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
  white-space: nowrap;
}
.app {
  display: flex;
  min-height: 100dvh;
}
.auth-open {
  overflow: hidden;
}
.auth-open .app {
  display: none;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 25px;
  letter-spacing: -1px;
  font-weight: 700;
}
.brand-dot {
  color: var(--primary);
  margin-left: -8px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 36px;
  border-radius: 11px;
  background: var(--primary);
  color: var(--surface);
}
.brand-mark .icon {
  width: 24px;
  height: 24px;
}
.sidebar {
  width: 244px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 35px 20px 18px;
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.sidebar .logo {
  padding: 0 12px;
  margin-bottom: 48px;
}
.nav-caption,
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.9px;
  font-weight: 650;
}
.nav-caption {
  color: var(--muted);
  padding: 0 16px;
  margin-bottom: 15px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav-link {
  text-decoration: none;
  color: var(--muted);
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 550;
}
.nav-link:hover {
  color: var(--primary);
  background: var(--bg);
}
.nav-link.active {
  background: var(--primary-soft);
  color: var(--primary);
}
.nav-badge {
  font-size: 9px;
  margin-left: auto;
  border: 1px solid var(--border);
  padding: 0 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 32px;
}
.sidebar-tip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 17px;
  margin-bottom: 19px;
}
.sidebar-tip > .icon {
  color: var(--primary);
  display: block;
  margin-bottom: 10px;
}
.sidebar-tip strong {
  font-size: 12px;
  font-weight: 600;
}
.sidebar-tip p {
  color: var(--muted);
  font-size: 11px;
  margin: 5px 0 0;
  line-height: 1.7;
}
.theme-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 12px;
}
.theme-btn:hover,
.icon-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.profile {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding: 20px 0 0;
  display: flex;
  gap: 9px;
  align-items: center;
}
.avatar {
  background: var(--peach);
  color: var(--peach-ink);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 650;
  flex-shrink: 0;
}
.profile > div {
  min-width: 0;
  flex: 1;
}
.profile strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile div > span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
}
.icon-btn {
  display: grid;
  place-items: center;
  padding: 7px;
  background: transparent;
  border: 0;
  color: var(--muted);
  border-radius: 8px;
}
.icon-btn .icon {
  width: 17px;
}
.content {
  flex: 1;
  min-width: 0;
  padding: 32px clamp(22px, 3.7vw, 66px) 0;
  max-width: 1600px;
  margin: 0 auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 29px;
  gap: 16px;
}
.topbar .eyebrow {
  color: var(--muted);
  font-size: 9px;
}
.topbar h1 {
  margin: 2px 0 0;
  font-size: 25px;
  letter-spacing: -0.8px;
  font-weight: 600;
}
.topbar-meta {
  display: flex;
  align-items: center;
  gap: 18px;
}
#today-date {
  color: var(--muted);
  font-size: 11px;
}
.status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status.ok {
  color: var(--primary);
}
.status.error {
  color: #c85346;
}
.page {
  display: none;
}
.page.active {
  display: block;
  animation: arrive 0.3s ease both;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.welcome-banner {
  min-height: 293px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--hero);
  color: var(--hero-ink);
  display: flex;
  overflow: hidden;
  position: relative;
}
.welcome-copy {
  padding: 33px 37px;
  z-index: 1;
  flex: 1;
}
.welcome-copy .eyebrow {
  font-size: 9px;
  letter-spacing: 1.6px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.tiny-dot {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.welcome-copy h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 3vw, 43px);
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -1.5px;
  margin: 15px 0 12px;
}
.welcome-copy p {
  font-size: 12px;
  opacity: 0.8;
  margin: 0 0 20px;
  line-height: 1.7;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--primary);
  color: var(--surface);
  font-weight: 550;
  font-size: 12px;
  line-height: 1.5;
}
.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px #16422c12;
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.welcome-copy .btn {
  gap: 10px;
}
.welcome-copy .btn .icon:last-child {
  margin-left: 10px;
}
.btn.secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}
.btn.secondary:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.btn.danger {
  color: #b54444;
  background: transparent;
  padding: 6px 9px;
  font-size: 11px;
}
.welcome-art {
  position: relative;
  width: 40%;
  max-width: 380px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.orbit {
  position: absolute;
  border: 1px solid #64835726;
  width: 280px;
  height: 280px;
  border-radius: 50%;
}
.orbit-two {
  width: 210px;
  height: 210px;
}
.floating-note {
  width: 155px;
  height: 190px;
  padding: 19px;
  background: #fffef5;
  color: #466044;
  transform: rotate(-9deg);
  box-shadow: 7px 15px 24px #2d4d2c13;
  border: 1px solid #dde2cf;
  border-radius: 6px;
  position: relative;
}
.paper-label {
  display: block;
  font-size: 7px;
  letter-spacing: 1.3px;
  font-weight: 600;
}
.floating-note > .icon {
  width: 43px;
  height: 43px;
  margin: 15px 0 12px;
  stroke-width: 1;
}
.paper-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.paper-lines i,
.art-paper i {
  height: 3px;
  background: #d5deca;
  display: block;
  border-radius: 4px;
}
.paper-lines i:nth-child(2) {
  width: 85%;
}
.paper-lines i:nth-child(3) {
  width: 60%;
}
.paper-footer {
  display: block;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 10px;
  margin-top: 13px;
}
.floating-spark {
  position: absolute;
  font-size: 77px;
  line-height: 1;
  color: #8b9c60;
  top: 34px;
  right: 26px;
  transform: rotate(15deg);
}
.floating-label {
  position: absolute;
  background: #f9fcf4;
  border: 1px solid #d8e3d0;
  color: #4c6445;
  border-radius: 8px;
  font-size: 11px;
  padding: 10px 15px;
  transform: rotate(6deg);
  bottom: 34px;
  right: 23px;
  box-shadow: 0 4px 10px #25432d0a;
  display: flex;
  align-items: center;
  gap: 7px;
}
.floating-label .icon {
  width: 15px;
  height: 15px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 14px;
}
.section-heading h2 {
  font-size: 14px;
  letter-spacing: -0.2px;
  margin: 0;
  font-weight: 600;
}
.section-heading > span {
  font-size: 10px;
  color: var(--muted);
}
.cards {
  display: grid;
  gap: 15px;
}
.stats-grid,
.action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 23px;
  box-shadow: var(--shadow);
}
.stat-card {
  display: grid;
  grid-template-columns: 41px 1fr;
  align-items: start;
  gap: 2px 14px;
  padding: 21px 22px 17px;
}
.stat-icon,
.action-icon {
  width: 39px;
  height: 39px;
  border-radius: 11px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.mint {
  background: var(--mint);
  color: var(--primary);
}
.peach {
  background: var(--peach);
  color: var(--peach-ink);
}
.lilac {
  background: var(--lilac);
  color: var(--lilac-ink);
}
.stat-card h3 {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 2px;
}
.big {
  font-size: 29px;
  font-weight: 550;
  line-height: 1.3;
  letter-spacing: -1.2px;
  margin: 0;
}
.stat-caption {
  grid-column: 1/-1;
  font-size: 9px;
  color: var(--muted);
  margin-top: 12px;
}
.action-card {
  padding: 23px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: left;
  box-shadow: var(--shadow);
}
.action-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px #2445340b;
}
.action-card h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 17px 0 7px;
  letter-spacing: -0.15px;
}
.action-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 18px;
}
.action-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
}
.action-link .icon {
  width: 17px;
  height: 17px;
}
.dashboard-bottom {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 17px;
  margin-top: 23px;
}
.recent-card .section-heading {
  margin: 0 0 15px;
}
.recent-card .section-heading > .icon {
  color: var(--muted);
  width: 18px;
}
.recent-list {
  display: flex;
  flex-direction: column;
}
.empty-state {
  text-align: center;
  padding: 24px 15px;
  color: var(--muted);
  font-size: 11px;
}
.empty-state .icon {
  display: block;
  margin: 0 auto 10px;
  width: 26px;
  height: 26px;
  color: var(--primary);
  opacity: 0.65;
}
.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 550;
  margin-bottom: 3px;
}
.empty-state p {
  margin: 0;
}
.recent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}
.recent-row:last-child {
  border-bottom: 0;
}
.recent-row span:first-child {
  overflow-wrap: anywhere;
}
.recent-row span:last-child {
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
  background: var(--primary-soft);
  border-radius: 5px;
  padding: 4px 9px;
}
.study-tip {
  background: var(--peach);
  border-radius: 12px;
  padding: 23px;
  position: relative;
  overflow: hidden;
}
.study-tip .eyebrow {
  font-size: 8px;
  letter-spacing: 1.3px;
  color: var(--peach-ink);
}
.quote-mark {
  position: absolute;
  right: 22px;
  top: 20px;
  font:
    95px Georgia,
    serif;
  color: var(--peach-ink);
  opacity: 0.18;
}
.study-tip p {
  font:
    24px/1.3 Georgia,
    serif;
  letter-spacing: -0.4px;
  margin: 20px 0 0;
}
.study-tip p em {
  color: var(--peach-ink);
}
.study-tip > .icon {
  position: absolute;
  right: 20px;
  bottom: 20px;
  color: var(--peach-ink);
  width: 28px;
  height: 28px;
}
.workspace-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  color: var(--muted);
  padding: 27px 0;
}
.workspace-footer span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.workspace-footer .icon {
  width: 13px;
  height: 13px;
}
.page-intro {
  margin: 10px 0 28px;
}
.page-intro .eyebrow {
  color: var(--primary);
  font-size: 9px;
}
.page-intro h2 {
  font:
    36px/1.2 Georgia,
    serif;
  letter-spacing: -1.1px;
  margin: 11px 0 10px;
}
.page-intro p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.form-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 27px;
  margin-bottom: 20px;
}
.form-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 10px;
}
.form-heading h3 {
  font-size: 15px;
  margin: 0 0 3px;
  font-weight: 600;
}
.form-heading p {
  color: var(--muted);
  font-size: 11px;
  margin: 0;
}
label {
  font-size: 11px;
  font-weight: 550;
}
input:not([type="file"]),
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 12px 14px;
  font-size: 12px;
  min-height: 43px;
}
textarea {
  resize: vertical;
  line-height: 1.8;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.or {
  color: var(--muted);
  font-size: 10px;
}
.form-row input[type="file"] {
  color: var(--muted);
  max-width: 230px;
  font-size: 10px;
}
.form-row input::file-selector-button {
  border: 1px dashed var(--border);
  color: var(--text);
  background: var(--bg);
  padding: 8px;
  border-radius: 5px;
  margin-right: 8px;
  cursor: pointer;
}
.msg {
  min-height: 1.2em;
  font-size: 11px;
  margin: 0;
}
.msg.ok {
  color: var(--primary);
}
.msg.error {
  color: #c85346;
}
.notes-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  padding-bottom: 28px;
}
.notes-grid > .empty-state {
  grid-column: 1/-1;
  padding: 45px;
  border-style: dashed;
}
.note-card {
  border-top: 3px solid var(--primary);
}
.note-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.note-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin: 0 0 20px;
  overflow-wrap: anywhere;
}
.note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--muted);
}
.chat-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: min(650px, 70dvh);
  min-height: 380px;
  overflow: hidden;
  margin-bottom: 30px;
}
.chat-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 17px 24px;
  border-bottom: 1px solid var(--border);
}
.chat-heading strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.chat-heading div > span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.chat-badge {
  margin-left: auto;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
}
.chat-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 25px;
  gap: 17px;
}
.chat-welcome {
  margin: auto;
  text-align: center;
}
.chat-welcome-icon {
  background: var(--mint);
  color: var(--primary);
  width: 64px;
  height: 64px;
  display: inline-grid;
  place-items: center;
  border-radius: 22px;
  transform: rotate(-7deg);
  margin-bottom: 10px;
}
.chat-welcome-icon .icon {
  width: 30px;
  height: 30px;
}
.chat-welcome h3 {
  font:
    27px Georgia,
    serif;
  letter-spacing: -0.7px;
  margin: 10px 0;
}
.chat-welcome p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.bubble {
  max-width: 82%;
  border-radius: 13px;
  padding: 13px 17px;
  line-height: 1.8;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.bot {
  align-self: flex-start;
  background: var(--primary-soft);
  border-bottom-left-radius: 3px;
}
.bubble.user {
  align-self: flex-end;
  background: var(--primary);
  color: var(--surface);
  border-bottom-right-radius: 3px;
}
.bubble.thinking {
  opacity: 0.65;
  animation: breathe 1s ease-in-out infinite alternate;
}
@keyframes breathe {
  to {
    opacity: 1;
  }
}
.chat-form {
  display: flex;
  gap: 10px;
  padding: 15px 20px 8px;
}
.chat-form input {
  flex: 1;
  min-width: 0;
}
.chat-disclaimer {
  font-size: 9px;
  color: var(--muted);
  text-align: center;
  margin: 0;
  padding: 0 15px 13px;
}
.quiz-q {
  margin-bottom: 17px;
}
.quiz-q h3 {
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 17px;
}
.quiz-opt {
  display: block;
  width: 100%;
  padding: 14px 17px;
  text-align: left;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
}
.quiz-opt:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.quiz-opt:disabled {
  opacity: 1;
  cursor: default;
}
.quiz-opt.correct {
  background: #def0dd;
  border-color: #63a272;
  color: #215b31;
}
.quiz-opt.wrong {
  background: #fbe4e0;
  border-color: #ca7a70;
  color: #8b302d;
}
.quiz-score {
  text-align: center;
  color: var(--primary);
  font:
    28px Georgia,
    serif;
  background: var(--primary-soft);
  margin-bottom: 25px;
}
.flash-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(235px, 100%), 1fr));
  margin-bottom: 30px;
}
.flashcard {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 15px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 27px;
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}
.flashcard::after {
  content: "TAP TO REVEAL";
  font-size: 8px;
  letter-spacing: 1.7px;
  color: var(--muted);
}
.flashcard:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}
.flashcard.flipped {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.flashcard.flipped::after {
  content: "TAP TO SEE QUESTION";
  color: var(--primary);
}
.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  z-index: 100;
  background: var(--bg);
  overflow: auto;
}
.auth-story {
  width: 48%;
  background: #1e4b38;
  color: #f1f1de;
  padding: 45px clamp(30px, 5vw, 90px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 100dvh;
}
.auth-story .brand-mark {
  background: #dce8be;
  color: #254b37;
}
.auth-story .brand-dot {
  color: #c8da9a;
}
.auth-story-copy {
  margin: auto 0 0;
  padding-top: 60px;
  position: relative;
  z-index: 1;
}
.auth-story .eyebrow {
  color: #c0d2a9;
  font-size: 9px;
}
.auth-story-copy h1 {
  font:
    clamp(48px, 5.5vw, 82px) / 1.06 Georgia,
    serif;
  letter-spacing: -3px;
  margin: 24px 0;
}
.auth-story-copy h1 em {
  color: #c4d7a3;
}
.auth-story-copy p {
  font-size: 13px;
  line-height: 1.9;
  color: #c1d1c3;
}
.auth-art {
  position: relative;
  height: 245px;
  width: 100%;
  max-width: 360px;
  margin: 15px auto 0;
  flex-shrink: 0;
}
.art-ring {
  border: 1px solid #c5d9a82b;
  border-radius: 50%;
  position: absolute;
  width: 250px;
  height: 250px;
  left: 20px;
  top: 0;
}
.art-star {
  font-size: 108px;
  position: absolute;
  right: 5px;
  top: -4px;
  color: #adbf7e;
}
.art-paper {
  background: #f2eedc;
  color: #31543c;
  width: 190px;
  height: 155px;
  border-radius: 6px;
  padding: 20px;
  position: absolute;
  left: 30px;
  top: 43px;
  transform: rotate(-11deg);
  box-shadow: 0 10px 24px #091e2b20;
}
.art-paper > .icon {
  width: 25px;
  height: 25px;
  display: block;
  margin-bottom: 12px;
}
.art-paper > span {
  font:
    14px Georgia,
    serif;
}
.art-paper i {
  margin-top: 8px;
  width: 90%;
  height: 3px;
}
.art-paper i:last-child {
  width: 55%;
}
.art-tag {
  position: absolute;
  display: flex;
  gap: 7px;
  align-items: center;
  right: 0;
  bottom: 29px;
  background: #dce8be;
  color: #31513a;
  border-radius: 6px;
  padding: 10px 13px;
  font-size: 10px;
  transform: rotate(5deg);
}
.art-tag .icon {
  width: 14px;
}
.auth-footnote {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 10px;
  color: #becfbd;
  margin-top: auto;
  padding-top: 25px;
}
.auth-footnote .icon {
  width: 16px;
}
.auth-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 60px 35px;
}
.auth-theme {
  position: absolute;
  top: 25px;
  right: 25px;
  padding: 10px;
  border: 1px solid var(--border);
}
.auth-card {
  width: 100%;
  max-width: 355px;
  display: flex;
  flex-direction: column;
}
.auth-card > .eyebrow {
  color: var(--primary);
  font-size: 9px;
}
.auth-card h2 {
  font:
    43px/1.15 Georgia,
    serif;
  letter-spacing: -1.8px;
  margin: 13px 0 10px;
}
.auth-description {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 32px;
}
.auth-card label {
  margin: 0 0 7px;
}
.auth-card input {
  background: var(--surface);
  margin-bottom: 20px;
  padding: 13px 14px;
}
.auth-card > .btn {
  justify-content: space-between;
  padding: 13px 17px;
  margin-top: 5px;
}
.auth-card .msg {
  margin-top: 12px;
}
.auth-card > a {
  text-decoration: none;
  text-align: center;
  font-size: 11px;
  margin-top: 12px;
}
.auth-card > a:hover {
  text-decoration: underline;
}
.auth-note {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin: 45px 0 0;
}
.auth-note .icon {
  width: 14px;
  height: 14px;
}
@media (min-width: 1600px) {
  .content {
    padding-top: 40px;
  }
  .welcome-banner {
    min-height: 330px;
  }
  .welcome-copy {
    padding: 40px;
  }
  .welcome-copy h2 {
    font-size: 48px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 210px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .content {
    padding: 26px 24px 0;
  }
  .stat-card {
    padding: 17px 15px;
    gap: 2px 9px;
  }
  .action-card {
    padding: 19px;
  }
  .action-card h3 {
    font-size: 12px;
  }
  .action-card p br {
    display: none;
  }
  .welcome-copy {
    padding: 28px;
  }
  .welcome-art {
    width: 35%;
  }
  .floating-spark {
    right: 4px;
    font-size: 60px;
  }
  .floating-label {
    right: 6px;
  }
  .floating-note {
    width: 135px;
  }
  .topbar-meta {
    gap: 10px;
  }
}
@media (max-width: 800px) {
  .sidebar {
    width: 76px;
    padding: 28px 12px 15px;
  }
  .sidebar .logo {
    font-size: 0;
    padding: 0;
    justify-content: center;
    margin-bottom: 35px;
    gap: 0;
  }
  .brand-dot {
    display: none;
  }
  .nav-caption,
  .sidebar-tip,
  .nav-badge,
  .profile > div,
  .sidebar .theme-btn span {
    display: none;
  }
  .nav-link {
    font-size: 0;
    justify-content: center;
    padding: 14px;
    gap: 0;
  }
  .nav-link .icon {
    width: 21px;
    height: 21px;
  }
  .sidebar .theme-btn {
    justify-content: center;
    width: 100%;
  }
  .profile {
    flex-direction: column;
    gap: 10px;
  }
  .content {
    padding: 24px 24px 0;
  }
  .action-card {
    padding: 17px;
  }
  .stat-card {
    grid-template-columns: 32px 1fr;
  }
  .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .stat-icon .icon {
    width: 17px;
  }
  .stat-card h3 {
    font-size: 9px;
  }
  .auth-story {
    width: 43%;
    padding: 35px 28px;
  }
  .auth-story-copy h1 {
    font-size: 53px;
  }
  .auth-art {
    transform: scale(0.85);
    transform-origin: left center;
  }
  .auth-panel {
    padding: 65px 28px;
  }
}
@media (max-width: 600px) {
  .app {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 18px 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    overflow: visible;
  }
  .sidebar .logo {
    font-size: 22px;
    margin: 0;
    gap: 8px;
  }
  .brand-mark {
    width: 29px;
    height: 31px;
    border-radius: 9px;
  }
  .brand-mark .icon {
    width: 20px;
  }
  .sidebar nav {
    order: 3;
    flex: 0 0 calc(100% + 8px);
    flex-direction: row;
    justify-content: space-between;
    gap: 3px;
    margin: 0 -4px;
    padding-bottom: 10px;
  }
  .nav-link {
    flex-direction: column;
    font-size: 9px;
    padding: 9px 5px;
    gap: 6px;
    flex: 1;
    white-space: nowrap;
    border-radius: 7px;
  }
  .nav-link .icon {
    width: 18px;
    height: 18px;
  }
  .sidebar-bottom {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 0 0 0 auto;
    padding: 0;
  }
  .sidebar .theme-btn {
    padding: 8px;
  }
  .profile {
    border: 0;
    padding: 0;
    margin: 0;
  }
  .profile .avatar {
    display: none;
  }
  .icon-btn .icon {
    width: 19px;
  }
  .content {
    padding: 22px 18px 0;
    width: 100%;
  }
  .topbar {
    margin-bottom: 20px;
  }
  .topbar h1 {
    font-size: 23px;
  }
  #today-date {
    display: none;
  }
  .topbar .eyebrow {
    font-size: 8px;
  }
  .status {
    font-size: 9px;
    padding: 5px 8px;
  }
  .welcome-banner {
    min-height: 290px;
  }
  .welcome-copy {
    padding: 25px 22px;
  }
  .welcome-copy h2 {
    font-size: 35px;
  }
  .welcome-copy p {
    font-size: 11px;
    max-width: 190px;
  }
  .desktop-break {
    display: none;
  }
  .welcome-art {
    position: absolute;
    inset: 0 0 0 auto;
    width: 100px;
    opacity: 0.4;
    pointer-events: none;
  }
  .floating-note {
    position: absolute;
    width: 110px;
    height: 158px;
    right: -35px;
    top: 75px;
    opacity: 0.65;
    padding: 14px;
  }
  .paper-label {
    font-size: 6px;
  }
  .floating-note > .icon {
    width: 30px;
    height: 30px;
  }
  .paper-footer {
    font-size: 8px;
  }
  .orbit-one {
    width: 190px;
    height: 190px;
  }
  .orbit-two {
    width: 140px;
    height: 140px;
  }
  .floating-spark {
    font-size: 47px;
    top: 30px;
    right: 5px;
  }
  .floating-label {
    display: none;
  }
  .section-heading {
    margin-top: 24px;
  }
  .section-heading h2 {
    font-size: 13px;
  }
  .section-heading > span {
    font-size: 9px;
  }
  .stats-grid {
    gap: 8px;
  }
  .stat-card {
    display: flex;
    flex-direction: column;
    padding: 13px 10px;
    gap: 12px;
    border-radius: 10px;
  }
  .stat-card h3 {
    font-size: 9px;
    min-height: 27px;
    line-height: 1.5;
  }
  .big {
    font-size: 26px;
  }
  .stat-caption {
    display: none;
  }
  .action-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .action-card {
    position: relative;
    padding: 18px 20px 18px 77px;
    min-height: 120px;
  }
  .action-card > .action-icon {
    position: absolute;
    top: 19px;
    left: 20px;
  }
  .action-card h3 {
    margin: 0 0 4px;
    font-size: 13px;
  }
  .action-card p {
    margin: 0 0 10px;
    font-size: 11px;
  }
  .action-link {
    font-size: 10px;
  }
  .dashboard-bottom {
    grid-template-columns: 1fr;
  }
  .study-tip {
    min-height: 180px;
  }
  .study-tip p {
    font-size: 26px;
  }
  .study-tip p br {
    display: none;
  }
  .study-tip p em {
    display: block;
  }
  .workspace-footer {
    font-size: 8px;
    gap: 10px;
  }
  .page-intro h2 {
    font-size: 30px;
  }
  .page-intro p {
    font-size: 11px;
  }
  .form-card {
    padding: 20px;
  }
  .form-heading h3 {
    font-size: 13px;
  }
  .form-heading p {
    font-size: 10px;
  }
  .form-row {
    gap: 10px;
  }
  .form-row .or {
    display: none;
  }
  .form-row input[type="file"] {
    max-width: 100%;
    width: 100%;
    order: 2;
    margin-top: 7px;
  }
  .form-row #upload-note {
    order: 3;
  }
  .chat-card {
    height: 65dvh;
    min-height: 430px;
  }
  .chat-heading {
    padding: 15px;
  }
  .chat-box {
    padding: 17px;
  }
  .bubble {
    max-width: 91%;
  }
  .chat-form {
    padding: 12px 12px 8px;
    gap: 7px;
  }
  .chat-form input {
    font-size: 12px;
    padding: 10px;
  }
  .chat-form .btn {
    padding: 10px;
  }
  .chat-form .btn span {
    display: none;
  }
  .chat-disclaimer {
    font-size: 8px;
  }
  .auth-screen {
    flex-direction: column;
  }
  .auth-story {
    width: 100%;
    min-height: 0;
    padding: 25px 27px 28px;
    flex-shrink: 0;
  }
  .auth-story .logo {
    font-size: 23px;
  }
  .auth-story-copy {
    padding: 25px 0 0;
  }
  .auth-story-copy h1 {
    font-size: 39px;
    letter-spacing: -1.5px;
    margin: 12px 0 0;
  }
  .auth-story-copy h1 br {
    display: none;
  }
  .auth-story-copy h1 em {
    display: block;
  }
  .auth-story-copy .eyebrow {
    font-size: 8px;
  }
  .auth-story-copy p,
  .auth-art,
  .auth-footnote {
    display: none;
  }
  .auth-panel {
    padding: 38px 27px 30px;
    align-items: flex-start;
  }
  .auth-theme {
    top: 15px;
    right: 18px;
    padding: 7px;
  }
  .auth-theme .icon {
    width: 16px;
  }
  .auth-card h2 {
    font-size: 35px;
  }
  .auth-card > .eyebrow {
    font-size: 8px;
  }
  .auth-description {
    margin-bottom: 24px;
  }
  .auth-note {
    margin-top: 26px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Saved material and quiz sessions */
[hidden] {
  display: none !important;
}
.field-hint {
  color: var(--muted);
  font-size: 11px;
  margin: 0;
}
.active-quiz-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--primary-soft);
  font-size: 12px;
}
.quiz-session-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  position: sticky;
  top: 10px;
  z-index: 2;
  margin-bottom: 18px;
  box-shadow: 0 5px 20px #00000009;
}
.quiz-session-header > div:first-child {
  flex: 1;
  min-width: 160px;
}
.quiz-session-header h3 {
  margin: 0 0 4px;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.quiz-session-header p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.quiz-clock {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 15px;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.quiz-clock.urgent {
  background: #fbe4e0;
  color: #8b302d;
  border-color: #ca7a70;
}
.quiz-summary strong,
.quiz-summary span {
  display: block;
}
.quiz-summary strong {
  font:
    25px Georgia,
    serif;
  color: var(--primary);
}
.quiz-summary span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.quiz-explanation {
  margin-top: 18px;
  padding: 15px 17px;
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: var(--primary-soft);
}
.quiz-explanation strong {
  font-size: 12px;
}
.quiz-explanation p {
  margin: 7px 0 0;
  line-height: 1.8;
  font-size: 12px;
}
.material-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  margin-bottom: 30px;
}
.material-card h3 {
  font-size: 14px;
  margin: 0;
  overflow-wrap: anywhere;
}
.material-card p {
  color: var(--muted);
  font-size: 11px;
  margin: 8px 0 17px;
}
.material-grid > .empty-state {
  grid-column: 1/-1;
  border-style: dashed;
}
@media (max-width: 600px) {
  .quiz-session-header {
    padding: 16px;
    top: 5px;
    gap: 10px;
  }
  .quiz-session-header > div:first-child {
    flex-basis: 100%;
  }
  .quiz-clock {
    font-size: 18px;
    padding: 7px 12px;
  }
  .active-quiz-banner {
    padding: 10px;
    font-size: 11px;
  }
}

/* Personal preferences and bidirectional layouts. */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}
.settings-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.settings-panel h3 {
  margin: 0;
  font-size: 16px;
}
.settings-panel > p {
  color: var(--muted);
  margin: 0 0 7px;
  font-size: 12px;
}
.settings-panel label {
  margin-top: 7px;
}
.settings-panel button {
  align-self: flex-start;
  margin-top: 8px;
}
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}
.settings-actions .msg {
  flex-basis: 100%;
}
.auth-language {
  position: absolute;
  top: 25px;
  right: 84px;
  width: 116px;
  min-height: 42px;
  padding: 8px 10px;
  font-size: 12px;
  background: var(--surface);
}
.app-toast {
  position: fixed;
  inset-inline-end: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 15px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 6px 24px #00000015;
  z-index: 200;
  font-size: 13px;
}
[dir="auto"] {
  unicode-bidi: plaintext;
  text-align: start;
}
input[type="email"],
input[type="password"] {
  direction: ltr;
  text-align: left;
}
.flashcard::after,
.flashcard.flipped::after {
  content: attr(data-hint);
}
.file-picker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  min-width: 0;
}
.file-picker:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}
#note-file-name {
  font-size: 10px;
  color: var(--muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[lang="ar"] body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.8;
}
[lang="ar"] h1,
[lang="ar"] h2,
[lang="ar"] .study-tip p,
[lang="ar"] .auth-card h2,
[lang="ar"] .auth-story-copy h1,
[lang="ar"] .page-intro h2,
[lang="ar"] .chat-welcome h3 {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  letter-spacing: 0;
}
[lang="ar"] .eyebrow,
[lang="ar"] .nav-caption,
[lang="ar"] .paper-label {
  letter-spacing: 0;
}
[lang="ar"] .welcome-copy h2 {
  line-height: 1.5;
  font-size: clamp(28px, 2.6vw, 39px);
}
[lang="ar"] .auth-story-copy h1 {
  font-size: clamp(38px, 4.8vw, 68px);
  line-height: 1.55;
}
[lang="ar"] .auth-card h2 {
  font-size: 35px;
}
[lang="ar"] .page-intro h2 {
  font-size: 31px;
}
[dir="rtl"] .sidebar {
  border-right: 0;
  border-left: 1px solid var(--border);
}
.logo {
  direction: ltr;
}
[dir="rtl"] .sidebar .logo {
  justify-content: flex-end;
}
[dir="rtl"] .nav-badge {
  margin-left: 0;
  margin-right: auto;
}
[dir="rtl"] .chat-badge {
  margin-left: 0;
  margin-right: auto;
}
[dir="rtl"] .directional-icon {
  transform: scaleX(-1);
}
[dir="rtl"] .auth-theme {
  right: auto;
  left: 25px;
}
[dir="rtl"] .auth-language {
  right: auto;
  left: 84px;
}
[dir="rtl"] .quiz-explanation {
  border-left: 0;
  border-right: 3px solid var(--primary);
  border-radius: 8px 0 0 8px;
}
[dir="rtl"] .sidebar-bottom {
  text-align: right;
}
[dir="rtl"] .action-card,
[dir="rtl"] .quiz-opt {
  text-align: start;
}
[dir="rtl"] .workspace-footer {
  gap: 12px;
}
[dir="rtl"] .welcome-copy .btn .icon:last-child {
  margin-left: 0;
  margin-right: 10px;
}
@media (max-width: 800px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  [dir="rtl"] .sidebar .logo {
    justify-content: center;
  }
}
@media (max-width: 600px) {
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .nav-link {
    min-width: 0;
    white-space: normal;
    text-align: center;
    justify-content: flex-start;
  }
  .nav-link > span {
    font-size: inherit;
    line-height: 1.4;
  }
  .auth-language {
    top: 15px;
    right: 64px;
    min-height: 32px;
    width: 96px;
    font-size: 11px;
    padding: 5px 8px;
  }
  [dir="rtl"] .auth-theme {
    left: 18px;
  }
  [dir="rtl"] .auth-language {
    left: 64px;
  }
  [dir="rtl"] .sidebar {
    border-left: 0;
  }
  [dir="rtl"] .sidebar-bottom {
    margin-left: 0;
    margin-right: auto;
  }
  [dir="rtl"] .action-card {
    padding-left: 20px;
    padding-right: 77px;
  }
  [dir="rtl"] .action-card > .action-icon {
    left: auto;
    right: 20px;
  }
  [dir="rtl"] .welcome-art {
    inset: 0 auto 0 0;
  }
  [dir="rtl"] .floating-note {
    right: auto;
    left: -35px;
  }
  [dir="rtl"] .floating-spark {
    right: auto;
    left: 5px;
  }
  [lang="ar"] .welcome-copy h2 {
    font-size: 29px;
  }
  [lang="ar"] .page-intro h2 {
    font-size: 27px;
  }
  [lang="ar"] .auth-story-copy h1 {
    font-size: 33px;
  }
  [lang="ar"] .auth-card h2 {
    font-size: 29px;
  }
  .settings-actions .btn {
    padding-inline: 12px;
  }
  .file-picker {
    flex-basis: 100%;
  }
}
[dir="rtl"] .auth-story .logo {
  justify-content: flex-end;
}
[dir="rtl"] input[dir="auto"]:placeholder-shown,
[dir="rtl"] textarea[dir="auto"]:placeholder-shown {
  text-align: right;
}
.file-picker {
  position: relative;
}
.file-picker input[type="file"] {
  position: absolute;
  width: 1px;
  max-width: 1px;
  inset: 0 auto auto 0;
}

/* Thakerli's localized wordmark and book-and-spark symbol. */
.logo {
  direction: inherit;
}
.brand-name {
  unicode-bidi: isolate;
}
[dir="rtl"] .sidebar .logo,
[dir="rtl"] .auth-story .logo {
  justify-content: flex-start;
}
[lang="ar"] .brand-name {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  letter-spacing: 0;
}
@media (min-width: 601px) and (max-width: 800px) {
  [dir="rtl"] .sidebar .logo {
    justify-content: center;
  }
}

/* Note references stay attached to their answer, including in RTL chat. */
.chat-sources {
  white-space: normal;
  border-top: 1px solid var(--border);
  margin-top: 17px;
  padding-top: 15px;
}
.chat-sources h4 {
  margin: 0 0 5px;
  font-size: 12px;
}
.source-caption {
  margin: 0 0 13px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}
.chat-source {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 13px;
  margin-top: 9px;
}
.chat-source.cited {
  border-inline-start: 3px solid var(--primary);
}
.chat-source > strong {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.source-badge {
  display: inline-block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.cited .source-badge {
  color: var(--primary);
}
.source-snippet {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  margin: 8px 0 11px;
  overflow-wrap: anywhere;
}
.chat-source .btn {
  padding: 6px 11px;
  font-size: 10px;
}
.source-warning {
  color: #b34e39;
  font-size: 11px;
}
[data-theme="dark"] .source-warning {
  color: #efb2a3;
}
.source-note-dialog {
  width: min(740px, calc(100vw - 32px));
  max-height: 85dvh;
  overflow-y: auto;
  padding: 27px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 80px #00000030;
}
.source-note-dialog::backdrop {
  background: #0c211ab3;
}
.source-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.source-dialog-header > div {
  min-width: 0;
}
.source-dialog-header .eyebrow {
  color: var(--primary);
}
.source-dialog-header h2 {
  font-size: 21px;
  margin: 7px 0 12px;
  overflow-wrap: anywhere;
}
.source-note-dialog h3 {
  font-size: 12px;
  margin: 22px 0 10px;
}
#source-note-excerpt {
  margin: 0;
  background: var(--primary-soft);
  border-inline-start: 3px solid var(--primary);
  padding: 15px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.source-full-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.9;
}
@media (max-width: 600px) {
  .source-note-dialog {
    padding: 20px;
    max-height: 90dvh;
  }
  .source-dialog-header h2 {
    font-size: 18px;
  }
}

/* Collection tools and focused review */
.collection-tools {
  display: flex;
  gap: 18px;
  align-items: end;
  margin-bottom: 12px;
}
.collection-tools > div {
  flex: 1;
  min-width: 0;
}
.collection-tools input,
.collection-tools select {
  margin-bottom: 0;
  width: 100%;
}
.collection-tools > p {
  flex: 1;
  margin: auto 0;
  color: var(--muted);
}
.collection-tools .btn {
  flex-shrink: 0;
}
.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}
.tag-chip {
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 5px 11px;
  font: inherit;
  font-size: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.tag-chip:hover {
  border-color: var(--primary);
}
.note-meta {
  flex-wrap: wrap;
  gap: 8px;
}
.note-meta > span {
  flex-basis: 100%;
}
.note-meta .btn {
  padding: 8px 12px;
  font-size: 12px;
}
.note-card h3,
.note-card p,
.material-card h3 {
  overflow-wrap: anywhere;
}
.edit-note-form {
  padding: 0;
}
.edit-note-form input,
.edit-note-form textarea {
  width: 100%;
}
.edit-note-form textarea {
  resize: vertical;
  min-height: 180px;
}
.source-update-hint {
  padding: 12px;
  border-inline-start: 3px solid var(--primary);
  font-size: 13px;
}
.material-card > .btn {
  margin-block-end: 8px;
}
.mistakes-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.mistake-card h3 {
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.mistake-meta {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.mistake-options {
  padding-inline-start: 28px;
}
.mistake-options li {
  padding: 6px;
  overflow-wrap: anywhere;
}
.mistake-card details {
  border-top: 1px solid var(--border);
  padding-block: 18px;
}
.mistake-card summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
}
.mistake-card details p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 800px) {
  .collection-tools {
    flex-wrap: wrap;
  }
  .collection-tools > div:first-child {
    flex-basis: 100%;
  }
  .mistakes-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .sidebar nav {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .nav-link > span {
    font-size: 9px;
  }
  .edit-note-form {
    padding: 0;
  }
  .collection-tools {
    gap: 12px;
    padding: 18px;
  }
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  margin: 7px 0 16px;
}

.text-action {
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  padding: 8px 0;
  text-align: start;
}
.privacy-link {
  text-align: center;
  font-size: 12px;
}
.verification-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--primary-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-block-end: 20px;
}
.verification-banner[hidden] {
  display: none;
}
.verification-banner > div {
  flex: 1;
  min-width: 180px;
}
.verification-banner .msg {
  margin: 5px 0 0;
}
.account-danger {
  margin-block-start: 24px;
  border-inline-start: 3px solid #bb5454;
}
.account-privacy-link {
  display: inline-block;
  margin-inline-start: 20px;
}
.account-dialog input {
  width: 100%;
}
.account-dialog .section-heading {
  align-items: center;
  gap: 12px;
}
.account-dialog h2 {
  font-size: 22px;
}
.privacy-page {
  max-width: 850px;
  margin: 45px auto;
  padding: 0 24px 50px;
}
.privacy-page header {
  margin-block-end: 30px;
}
.privacy-page h1 {
  font-size: clamp(26px, 4vw, 38px);
}
.privacy-page h2 {
  margin-block-start: 28px;
  font-size: 20px;
}
.privacy-page p,
.privacy-page li {
  line-height: 1.9;
}
.privacy-page .privacy-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
