:root {
  color-scheme: light;
  --green: #153f38;
  --green-strong: #17483f;
  --green-soft: #e8f0eb;
  --paper: #f7f8f3;
  --surface: #fff;
  --ink: #182c28;
  --muted: #6e7c76;
  --line: #e3e9e3;
  --shadow: 0 12px 30px rgb(24 50 42 / 6%);
  --gold: #d5b967;
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(#dce4dc 0.7px, transparent 0.7px);
  background-size: 18px 18px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-width {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.hero {
  position: relative;
  overflow: visible;
  color: #f5f7f1;
  background-color: var(--green);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 42px,
    rgb(255 255 255 / 3%) 43px,
    transparent 44px
  );
}

.topbar {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 26%);
  border-radius: 12px;
  color: #d5b967;
  font-size: 1.15rem;
}

.mobile-toolbar {
  display: none;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notification-menu {
  position: relative;
}

.notification-button {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -5px;
  inset-inline-end: -5px;
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding-inline: 4px;
  border: 2px solid var(--green);
  border-radius: 999px;
  color: #fff;
  background: #c64235;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
}

.notification-panel {
  position: fixed;
  z-index: 20;
  top: 76px;
  inset-inline-end: max(16px, calc((100vw - 1120px) / 2));
  width: min(390px, calc(100vw - 24px));
  max-height: min(70vh, 560px);
  overflow: visible;
  padding: 17px;
  border: 1px solid color-mix(in srgb, var(--green-strong) 24%, transparent);
  border-radius: 18px;
  color: var(--ink);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--surface) 89%, #d3f1e4),
    color-mix(in srgb, var(--surface) 92%, #d4e8f4) 55%,
    color-mix(in srgb, var(--surface) 91%, #f3e5c2));
  box-shadow: 0 24px 64px rgb(10 30 24 / 28%),
    inset 0 1px 0 rgb(255 255 255 / 76%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  backdrop-filter: blur(26px) saturate(165%);
}

.notification-panel:not([hidden]) {
  transform-origin: top center;
  animation: notification-panel-in 320ms cubic-bezier(.2, .85, .25, 1.12) both;
}

.notification-panel::before {
  position: absolute;
  top: -8px;
  left: var(--notification-arrow-left, 50%);
  z-index: 1;
  width: 16px;
  height: 16px;
  border-top: 1px solid color-mix(in srgb, var(--green-strong) 24%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--green-strong) 24%, transparent);
  border-radius: 3px 0 0;
  background: color-mix(in srgb, var(--surface) 89%, #d3f1e4);
  box-shadow: -3px -3px 8px rgb(10 30 24 / 8%);
  content: "";
  pointer-events: none;
  transform: translateX(-50%) rotate(45deg);
}

@keyframes notification-panel-in {
  from { opacity: 0; transform: translateY(-14px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes notification-item-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.notification-panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.notification-panel-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.notification-count,
.notification-empty {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .82rem;
}

.notification-read-button,
.notification-enable {
  border: 0;
  color: var(--green-strong);
  background: transparent;
  font-size: .78rem;
  font-weight: 700;
}

.notification-enable {
  width: 100%;
  min-height: 38px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--green-soft);
}

.notification-list {
  display: grid;
  gap: 8px;
  max-height: min(calc(70vh - 180px), 410px);
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notification-item {
  position: relative;
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 12px;
  color: inherit;
  text-align: start;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 48%);
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.notification-item.is-unread {
  border-color: color-mix(in srgb, #4b9b77 38%, transparent);
  background: linear-gradient(125deg,
    color-mix(in srgb, #74b995 19%, var(--surface)),
    color-mix(in srgb, #82b8cb 12%, var(--surface)));
}

.notification-item.is-unread::before {
  position: absolute;
  inset-block: 11px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #4b9b77, #70abc3);
  content: "";
}

.notification-item:hover {
  border-color: color-mix(in srgb, #4b9b77 42%, var(--line));
  background-color: color-mix(in srgb, #7db79a 16%, var(--surface));
  box-shadow: 0 5px 16px rgb(19 68 52 / 9%), inset 0 1px 0 rgb(255 255 255 / 55%);
}

.notification-item-open {
  width: fit-content;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: start;
  background: transparent;
  font: inherit;
}

.notification-item-open:hover .notification-item-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notification-item-title {
  display: block;
  font-weight: 700;
}

.notification-item-body {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .85rem;
  white-space: pre-wrap;
}

.notification-item-image {
  display: block;
  width: 100%;
  max-height: 180px;
  margin-top: 9px;
  border-radius: 9px;
  object-fit: contain;
  background: var(--paper);
}

.notification-attachments-label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.notification-attachments {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notification-attachments a {
  color: var(--green-strong);
  font-size: .83rem;
  overflow-wrap: anywhere;
}

.notification-item time {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: .75rem;
}

.notification-panel:not([hidden]) .notification-list > li:nth-child(-n+6) {
  animation: notification-item-in 360ms cubic-bezier(.2, .75, .25, 1) both;
}

.notification-panel:not([hidden]) .notification-list > li:nth-child(2) { animation-delay: 35ms; }
.notification-panel:not([hidden]) .notification-list > li:nth-child(3) { animation-delay: 70ms; }
.notification-panel:not([hidden]) .notification-list > li:nth-child(4) { animation-delay: 105ms; }
.notification-panel:not([hidden]) .notification-list > li:nth-child(5) { animation-delay: 140ms; }
.notification-panel:not([hidden]) .notification-list > li:nth-child(6) { animation-delay: 175ms; }

@media (prefers-reduced-motion: reduce) {
  .notification-panel:not([hidden]),
  .notification-panel:not([hidden]) .notification-list > li:nth-child(-n+6) {
    animation: none;
  }
}

.app-update-prompt {
  position: fixed;
  z-index: 40;
  inset-inline: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  width: fit-content;
  max-width: min(560px, calc(100vw - 32px));
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-inline: auto;
  padding: 12px 15px;
  border: 1px solid #a8c4b2;
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 12px 36px rgb(10 30 24 / 22%);
  font-size: .88rem;
}

.app-update-prompt button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 13px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--green);
  font-weight: 700;
}

.toolbar > a {
  text-decoration: none;
}

.outline-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgb(255 255 255 / 27%);
  border-radius: 9px;
  color: inherit;
  background: transparent;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.outline-button:hover {
  border-color: rgb(255 255 255 / 55%);
  background: rgb(255 255 255 / 8%);
}

.toolbar-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.language-icon {
  width: 17px;
  height: 17px;
}

[hidden] {
  display: none !important;
}

.hero-content {
  display: flex;
  min-height: 156px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-block: 18px 32px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #bed0c7;
  font-size: 0.9rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.35;
}

.hero-description {
  margin: 8px 0 0;
  color: #d1ddd6;
}

.total-card {
  display: flex;
  min-width: 126px;
  min-height: 70px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 12px;
  color: #e3ece5;
  white-space: nowrap;
}

.total-card strong {
  color: #d5b967;
  font-size: 1.55rem;
}

.main-content {
  min-height: calc(100vh - 320px);
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 340px);
  align-items: start;
  gap: 18px;
  padding-block: 28px 20px;
}

.category-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 9px;
}

.category-tree-node {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 6px;
}

.category-tree-node.has-children {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.category-tree-node > .category-button {
  grid-column: 1 / -1;
  width: 100%;
  text-align: start;
}

.category-tree-node.has-children > .category-button {
  grid-column: 1;
}

.category-expand-button {
  display: grid;
  width: 34px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--green-strong);
  background: var(--green-soft);
  font-size: 1.1rem;
}

.category-expand-button:hover {
  border-color: #9bb5a9;
  background: var(--green-soft);
}

.category-tree-children {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  margin: 2px 4px 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}

.category-filter-rail {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

@media (max-width: 760px) {
  .category-filter-rail {
    display: block;
    padding: 10px;
  }
}

.category-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.category-button:hover {
  border-color: #9bb5a9;
  background: var(--green-soft);
}

.category-button:disabled {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-style: dashed;
  color: var(--muted);
  cursor: not-allowed;
}

.coming-soon {
  padding: 1px 7px;
  border-radius: 20px;
  color: #806a32;
  background: #f3eedc;
  font-size: 0.72rem;
  white-space: nowrap;
}

.category-button[aria-pressed="true"] {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
  box-shadow: 0 5px 13px rgb(21 63 56 / 15%);
}

.category-list > .category-button {
  width: 100%;
  text-align: start;
}

@media (max-width: 1000px) {
  .category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.search-box {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding-inline: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface);
}

.search-box:focus-within {
  border-color: #6c9585;
  box-shadow: 0 0 0 3px rgb(75 124 103 / 12%);
}

.search-box > span {
  font-size: 1.35rem;
  line-height: 1;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.search-box input::placeholder {
  color: #8a9690;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 8px 13px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.9rem;
}

.file-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-block: 18px 28px;
}

.file-category-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.file-category-toggle {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 0;
  color: var(--ink);
  text-align: start;
  background: var(--surface);
  font: inherit;
  font-weight: 700;
}

.file-category-toggle:hover,
.file-category-toggle[aria-expanded="true"] {
  background: var(--green-soft);
}

.file-category-count {
  display: grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  margin-inline-start: auto;
  border-radius: 99px;
  color: var(--green-strong);
  background: var(--paper);
  font-size: .78rem;
  font-weight: 700;
}

.file-category-arrow {
  min-width: 17px;
  color: var(--green-strong);
  font-size: 1.2rem;
  text-align: center;
}

.file-category-contents {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.category-file-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 760px) {
  .category-file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .category-file-grid {
    grid-template-columns: 1fr;
  }
}

.file-category-group .file-category-group {
  box-shadow: none;
}

.file-category-contents .file-category-group {
  background: var(--paper);
}

.file-category-group .file-category-group .file-category-toggle {
  min-height: 44px;
  border-radius: 10px;
  font-size: .92rem;
}

.file-new-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 99px;
  color: #fff;
  background: #bc513b;
  font-size: .68rem;
  line-height: 1.5;
  vertical-align: middle;
}

.file-card {
  display: flex;
  min-width: 0;
  min-height: 170px;
  flex-direction: column;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.file-card:hover {
  transform: translateY(-2px);
  border-color: #c6d6cc;
  box-shadow: 0 16px 34px rgb(24 50 42 / 10%);
}

.file-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.file-cover {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 9px;
  background: var(--green-soft);
}

.file-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.pdf-icon {
  display: grid;
  width: 42px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: #a6443c;
  background: #f9ece9;
  font-size: 0.7rem;
  font-weight: 800;
}

.pdf-icon.video-icon {
  color: #3e5e91;
  background: #eaf0fb;
  font-size: 0.56rem;
}

.file-preview {
  display: block;
  width: 100%;
  max-height: 240px;
  margin-top: 14px;
  border-radius: 10px;
  background: var(--green-soft);
  object-fit: cover;
}

.video-preview {
  background: #101815;
}

.file-card h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.65;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.file-category {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 2px 9px;
  border-radius: 20px;
  color: var(--green-strong);
  background: var(--green-soft);
  font-size: 0.75rem;
}

.file-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.file-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.file-action:hover {
  border-color: #b2c6ba;
  background: var(--green-soft);
}

.file-action.primary {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.file-action.primary:hover {
  border-color: var(--green-strong);
  background: var(--green-strong);
}

.empty-state {
  margin: 0;
  padding: 56px 16px;
  color: var(--muted);
  text-align: center;
}

.footer {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.toast {
  position: fixed;
  z-index: 10;
  inset-inline-start: auto;
  left: 50%;
  bottom: 22px;
  width: max-content;
  max-width: min(440px, calc(100% - 32px));
  padding: 13px 18px;
  transform: translate(-50%, 14px);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #21483c, #142f29);
  box-shadow: 0 14px 38px rgb(0 0 0 / 24%);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  text-wrap: pretty;
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.download-progress {
  position: fixed;
  z-index: 9;
  inset-inline-start: auto;
  left: 50%;
  bottom: 18px;
  width: min(470px, calc(100% - 32px));
  padding: 16px 18px 14px;
  transform: translateX(-50%);
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 18px;
  color: #f7fbf8;
  background: linear-gradient(140deg, #214c40, #15372f);
  box-shadow: 0 18px 48px rgb(10 32 26 / 30%);
  animation: download-progress-in 240ms ease-out both;
}

.download-progress-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.download-progress-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(213 185 103 / 38%);
  border-radius: 13px;
  color: #f2d77f;
  background: rgb(213 185 103 / 12%);
  font-size: 1.45rem;
  font-weight: 800;
}

.download-progress-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.download-progress-copy strong {
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-progress-copy span {
  overflow: hidden;
  color: #c4d5cc;
  font-size: 0.79rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-progress-percent {
  min-width: 42px;
  color: #f2d77f;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.download-cancel {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 11px;
  color: #f7fbf8;
  background: rgb(255 255 255 / 7%);
  font-size: 1.35rem;
}

.download-cancel:hover {
  border-color: rgb(255 255 255 / 40%);
  background: rgb(255 255 255 / 14%);
}

.download-progress progress {
  display: block;
  width: 100%;
  height: 9px;
  margin-top: 13px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 99px;
  background: rgb(255 255 255 / 15%);
}

.download-progress progress::-webkit-progress-bar {
  border-radius: 99px;
  background: rgb(255 255 255 / 15%);
}

.download-progress progress::-webkit-progress-value {
  border-radius: 99px;
  background: linear-gradient(90deg, #d5b967, #f4df91);
  transition: width 140ms ease;
}

.download-progress progress::-moz-progress-bar {
  border-radius: 99px;
  background: linear-gradient(90deg, #d5b967, #f4df91);
}

.download-progress progress.indeterminate::-webkit-progress-value {
  width: 36%;
  animation: download-progress-indeterminate 1.15s ease-in-out infinite alternate;
}

.download-progress progress.indeterminate::-moz-progress-bar {
  width: 36%;
  animation: download-progress-indeterminate 1.15s ease-in-out infinite alternate;
}

.download-progress.is-complete .download-progress-icon {
  color: #a8e5bb;
  border-color: rgb(168 229 187 / 38%);
  background: rgb(168 229 187 / 12%);
}

.download-progress.is-complete progress::-webkit-progress-value,
.download-progress.is-complete progress::-moz-progress-bar {
  background: linear-gradient(90deg, #70c58c, #a8e5bb);
}

.download-progress.is-error .download-progress-icon {
  color: #ffb0a5;
  border-color: rgb(255 176 165 / 38%);
  background: rgb(255 176 165 / 12%);
}

@keyframes download-progress-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes download-progress-indeterminate {
  from { transform: translateX(-20%); }
  to { transform: translateX(190%); }
}

body:has(.download-progress:not([hidden])) .toast.visible {
  bottom: 150px;
}

body.dark {
  color-scheme: dark;
  --green: #102e29;
  --green-strong: #28594d;
  --green-soft: #263e37;
  --paper: #151d1a;
  --surface: #1e2925;
  --ink: #e6ede8;
  --muted: #a1b0a8;
  --line: #35443d;
  --shadow: 0 12px 30px rgb(0 0 0 / 14%);
  background-image: radial-gradient(#293630 0.7px, transparent 0.7px);
}

body.dark .category-button[aria-pressed="true"] {
  background: var(--green-strong);
}

body.dark .notification-item:hover,
body.dark .notification-enable {
  border-color: #466659;
  background: #243d34;
}

body.dark .notification-item.is-unread {
  border-color: color-mix(in srgb, #78c29c 42%, var(--line));
  background: linear-gradient(125deg,
    color-mix(in srgb, #317558 40%, var(--surface)),
    color-mix(in srgb, #386f83 28%, var(--surface)));
}

body.dark .notification-item:hover {
  border-color: #78c29c;
  background-color: #2c493d;
}

body.dark .file-category-toggle:hover,
body.dark .file-category-toggle[aria-expanded="true"],
body.dark .category-expand-button:hover {
  background: var(--green-soft);
}

body.dark .file-new-badge {
  color: #fff;
  background: #a74735;
}

body.dark .notification-read-button {
  color: #bcd8c8;
}

body.dark .pdf-icon {
  color: #ffaaa0;
  background: #452f2d;
}

body.dark .pdf-icon.video-icon {
  color: #b7cbf4;
  background: #29374e;
}

body.dark .mobile-toolbar {
  border-color: rgb(255 255 255 / 10%);
  background: rgb(30 41 37 / 96%);
}

body.dark .mobile-toolbar button,
body.dark .mobile-toolbar a {
  color: #bdcbc3;
}

body.dark .mobile-toolbar .mobile-toolbar-main {
  border-color: var(--paper);
  color: #fff;
  background: #28594d;
}

body.dark .category-scroll-button {
  color: #c5d8cd;
  background: var(--surface);
}

body.dark .category-scroll-button:disabled {
  color: var(--muted);
  background: var(--paper);
}

body.dark .category-scroll-button:not(:disabled):hover {
  color: #fff;
  background: var(--green-strong);
}

.semester-home {
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgb(21 63 56 / 9%);
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 12%, rgb(213 185 103 / 18%), transparent 26%),
    linear-gradient(135deg, #fff, #f0f5ee);
  box-shadow: 0 18px 48px rgb(24 50 42 / 8%);
}

.semester-intro { max-width: 620px; margin-bottom: 24px; }
.semester-intro .section-kicker { margin-bottom: 6px; color: var(--green-strong); font-weight: 700; }
.semester-intro h2 { margin: 0 0 7px; font-size: clamp(1.45rem, 3vw, 2rem); }
.semester-intro > p:last-child { margin: 0; color: var(--muted); }
.semester-grid, .category-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.semester-card {
  position: relative;
  display: grid;
  min-height: 190px;
  grid-template-columns: 68px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 18px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 23px;
  color: #fff;
  text-align: start;
  background: linear-gradient(125deg, #17483f, #256c58);
  box-shadow: 0 14px 28px rgb(21 63 56 / 18%);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.semester-card::after {
  position: absolute;
  inset-inline-end: -34px;
  bottom: -86px;
  width: 210px;
  height: 210px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.semester-card:not(:disabled) { cursor: pointer; }
.semester-card:not(:disabled):hover { transform: translateY(-4px); box-shadow: 0 20px 36px rgb(21 63 56 / 24%); }
.semester-card:not(:disabled):active { transform: translateY(-1px) scale(.99); }
.semester-card:focus-visible, .category-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.semester-card.is-coming-soon { color: var(--ink); background: linear-gradient(125deg, #eef1eb, #e1e8df); box-shadow: none; }
.semester-icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 20px;
  background: rgb(255 255 255 / 13%);
  font-size: 2rem;
}
.is-coming-soon .semester-icon { border-color: var(--line); background: #fff; }
.semester-card-content { display: grid; min-width: 0; gap: 5px; }
.semester-card-content strong { font-size: clamp(1.3rem, 2.5vw, 1.7rem); overflow-wrap: anywhere; }
.semester-status { width: fit-content; padding: 2px 10px; border-radius: 999px; color: #fff2c5; background: rgb(255 255 255 / 12%); font-size: .78rem; font-weight: 700; }
.is-coming-soon .semester-status { color: #765b1a; background: #f4e9c7; }
.semester-description { color: rgb(255 255 255 / 82%); line-height: 1.7; }
.is-coming-soon .semester-description { color: var(--muted); }
.semester-stats { margin-top: 7px; font-size: .9rem; font-weight: 700; }
.semester-arrow { position: relative; z-index: 1; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgb(255 255 255 / 32%); border-radius: 50%; font-size: 1.2rem; }
.is-coming-soon .semester-arrow { border-color: var(--line); }
.semester-skeleton { min-height: 190px; border-radius: 23px; background: linear-gradient(100deg, #e4e9e3 20%, #f3f5f0 40%, #e4e9e3 60%); background-size: 200% 100%; animation: library-shimmer 1.3s linear infinite; }
@keyframes library-shimmer { to { background-position-x: -200%; } }
.term-content { padding-top: 10px; }
.library-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 0 0 18px; color: var(--muted); }
.library-breadcrumbs button { min-height: 40px; padding: 5px 8px; border: 0; border-radius: 8px; color: var(--green-strong); background: transparent; font-weight: 700; }
.library-breadcrumbs button:hover { background: var(--green-soft); }
.category-cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 15px;
  margin-bottom: 22px;
}
.category-card {
  position: relative;
  display: grid;
  min-height: 126px;
  grid-template-columns: 54px minmax(0, 1fr) 30px;
  grid-template-rows: auto auto auto;
  align-items: center;
  gap: 5px 14px;
  overflow: hidden;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 21px;
  color: var(--ink);
  text-align: start;
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--green-soft) 25%, var(--surface)));
  box-shadow: 0 8px 22px rgb(24 50 42 / 6%);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}
.category-card::before { position: absolute; inset: 0 0 auto auto; width: 115px; height: 115px; border-radius: 50%; background: radial-gradient(circle, rgb(73 128 94 / 9%), transparent 70%); content: ""; pointer-events: none; }
.category-card:hover { transform: translateY(-4px); border-color: #a9c4b3; box-shadow: 0 16px 30px rgb(24 50 42 / 12%); }
.category-card:active:not(:disabled) { transform: translateY(-1px) scale(.99); }
.category-card:disabled { cursor: not-allowed; }
.category-card.is-coming-soon { opacity: .76; }
.category-card.is-coming-soon .category-card-count { color: #876c2b; background: #f5edda; }
.category-card-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 54px;
  height: 54px;
  grid-column: 1;
  grid-row: 1 / 4;
  place-items: center;
  border: 1px solid rgb(47 108 83 / 12%);
  border-radius: 17px;
  color: #28634c;
  background: linear-gradient(145deg, #e8f3e9, #d7eadc);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 75%), 0 5px 12px rgb(32 83 62 / 9%);
  font-size: 1.5rem;
}
.category-card-icon svg { width: 29px; height: 29px; }
.category-card-icon[data-theme="exam"] { color: #7b5a17; background: linear-gradient(145deg, #fff3d5, #f5e4b8); }
.category-card-icon[data-theme="lecture"] { color: #3c5f91; background: linear-gradient(145deg, #e9f1ff, #d9e6fa); }
.category-card-icon[data-theme="section"] { color: #76508a; background: linear-gradient(145deg, #f3eafa, #e8d9f1); }
.category-card-icon[data-theme="calculator"] { color: #28756e; background: linear-gradient(145deg, #e3f4f0, #cce9e2); }
.category-card-icon[data-theme="tax"] { color: #936126; background: linear-gradient(145deg, #fff0dc, #f4dfc1); }
.category-card-icon[data-theme="finance"] { color: #25704f; background: linear-gradient(145deg, #e5f4e7, #cfe8d4); }
.category-card-icon[data-theme="business"] { color: #48658a; background: linear-gradient(145deg, #e8eff8, #d5e0ef); }
.category-card-icon[data-theme="library"] { color: #9b6336; background: linear-gradient(145deg, #fff0df, #f4dfc8); }
.category-card-icon[data-theme="document"] { color: #9b5160; background: linear-gradient(145deg, #fdebed, #f4d9de); }
.category-card-icon.has-custom-icon { font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; }
.category-card > strong { position: relative; z-index: 1; min-width: 0; grid-column: 2; grid-row: 1; overflow-wrap: anywhere; font-size: 1.08rem; line-height: 1.45; }
.category-card-description { position: relative; z-index: 1; grid-column: 2; grid-row: 2; overflow: hidden; color: var(--muted); font-size: .84rem; line-height: 1.55; text-overflow: ellipsis; }
.category-card-count { position: relative; z-index: 1; width: fit-content; align-self: end; grid-column: 2; grid-row: 2; padding: 4px 10px; border-radius: 999px; color: var(--green-strong); background: var(--green-soft); font-size: .78rem; font-weight: 700; }
.category-card.has-description .category-card-count { grid-row: 3; }
.category-card-arrow { position: relative; z-index: 1; display: grid; width: 30px; height: 30px; grid-column: 3; grid-row: 1 / 4; place-items: center; border: 1px solid rgb(47 108 83 / 14%); border-radius: 50%; color: var(--green-strong); background: rgb(255 255 255 / 65%); font-size: 1.05rem; transition: transform 180ms ease; }
.category-card:hover .category-card-arrow { transform: translateX(-3px); }
.file-meta { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; }
.library-load-error { margin: 18px 0; padding: 14px 16px; border: 1px solid #edc7c1; border-radius: 13px; color: #8b342d; background: #fff4f1; }
.library-retry { margin-bottom: 16px; }
#library .category-filter-rail { display: none; }
body.dark .semester-home { border-color: var(--line); background: radial-gradient(circle at 8% 12%, rgb(213 185 103 / 10%), transparent 26%), linear-gradient(135deg, #1e2925, #202f29); }
body.dark .semester-card:not(.is-coming-soon) { background: linear-gradient(125deg, #214d42, #28624f); }
body.dark .semester-card.is-coming-soon { color: var(--ink); background: linear-gradient(125deg, #313c35, #28332e); }
body.dark .is-coming-soon .semester-icon { background: var(--surface); }
body.dark .category-card { border-color: var(--line); background: linear-gradient(145deg, var(--surface), #24342d); }
body.dark .category-card::before { background: radial-gradient(circle, rgb(129 184 151 / 9%), transparent 70%); }
body.dark .category-card-icon { border-color: rgb(255 255 255 / 8%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%), 0 5px 12px rgb(0 0 0 / 16%); }
body.dark .category-card-icon[data-theme="exam"] { color: #f1cc70; background: linear-gradient(145deg, #51452b, #3c3526); }
body.dark .category-card-icon[data-theme="lecture"] { color: #abc9f3; background: linear-gradient(145deg, #2d405b, #26364d); }
body.dark .category-card-icon[data-theme="section"] { color: #d5b6e6; background: linear-gradient(145deg, #493857, #382d43); }
body.dark .category-card-icon[data-theme="calculator"] { color: #9cdbce; background: linear-gradient(145deg, #284944, #223c38); }
body.dark .category-card-icon[data-theme="tax"] { color: #e7c08c; background: linear-gradient(145deg, #4b3c2b, #3b3328); }
body.dark .category-card-icon[data-theme="finance"] { color: #a7d9b9; background: linear-gradient(145deg, #294638, #23392f); }
body.dark .category-card-icon[data-theme="business"] { color: #b3c9e7; background: linear-gradient(145deg, #303f54, #293646); }
body.dark .category-card-icon[data-theme="library"] { color: #e4bc95; background: linear-gradient(145deg, #4b392d, #3b3028); }
body.dark .category-card-icon[data-theme="document"] { color: #e9abb6; background: linear-gradient(145deg, #4b3037, #3e292f); }
body.dark .category-card-count { color: #acd1ba; background: #2d4538; }
body.dark .category-card.is-coming-soon .category-card-count { color: #e3c579; background: #463e2b; }
body.dark .category-card-arrow { border-color: rgb(255 255 255 / 10%); background: rgb(255 255 255 / 5%); }
body.dark .library-breadcrumbs button { color: #a8c6b5; }
body.dark .library-breadcrumbs button:hover { background: #293c33; }
body.dark .library-load-error { border-color: #75433e; color: #ffc6bc; background: #382725; }

@media (max-width: 760px) {
  .page-width {
    width: min(100% - 32px, 600px);
  }

  .topbar {
    min-height: 72px;
    align-items: center;
    gap: 8px;
    padding-block: 12px;
  }

  .brand {
    min-width: 0;
    flex: 1 1 0;
    gap: 7px;
    font-size: .88rem;
  }

  .brand > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
  }

  .toolbar {
    width: auto;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1px;
  }

  .toolbar .admin-link {
    display: none;
  }

  .notification-panel {
    top: 68px;
    inset-inline-end: 12px;
  }

  .app-update-prompt {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .outline-button {
    width: 36px;
    min-width: 36px;
    min-height: 38px;
    padding: 5px;
    border: 1px solid rgb(255 255 255 / 20%);
    border-radius: 12px;
    background: rgb(255 255 255 / 7%);
  }

  .outline-button > span[data-text] {
    display: none;
  }

  .toolbar-icon {
    width: 19px;
    height: 19px;
  }

  .hero-content {
    min-height: 145px;
    padding-block: 8px 25px;
  }

  .total-card {
    min-width: auto;
    flex-direction: column;
    gap: 0;
    padding: 8px 12px;
    font-size: 0.75rem;
  }

  .controls {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-block: 20px 17px;
  }

  .search-box {
    grid-row: 1;
    min-height: 48px;
    padding-inline: 15px;
    border-radius: 14px;
    box-shadow: 0 5px 16px rgb(24 50 42 / 5%);
  }

  .category-list {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 3px 2px 7px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    scroll-snap-type: inline proximity;
    -webkit-overflow-scrolling: touch;
  }

  .category-list::-webkit-scrollbar {
    display: none;
  }

  .category-filter-rail {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    padding: 9px;
    border-radius: 16px;
  }

  .category-scroll-button {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--green-strong);
    background: var(--surface);
    box-shadow: 0 2px 7px rgb(24 50 42 / 7%);
    transition: color 160ms ease, background-color 160ms ease, opacity 160ms ease;
  }

  .category-scroll-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .category-scroll-button:disabled {
    color: var(--muted);
    background: var(--paper);
    box-shadow: none;
    cursor: default;
    opacity: .42;
  }

  .category-scroll-button:not(:disabled):hover {
    color: #fff;
    background: var(--green);
  }

  .category-button {
    width: max-content;
    max-width: min(62vw, 230px);
    min-height: 40px;
    flex: 0 0 auto;
    padding: 7px 13px;
    border-radius: 11px;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    scroll-snap-align: center;
  }

  .category-button > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .category-button[aria-pressed="true"] {
    box-shadow: 0 4px 11px rgb(21 63 56 / 15%);
  }

  .category-list > .category-button {
    width: max-content;
  }

  .category-tree-node {
    width: max-content;
    max-width: min(78vw, 290px);
    flex: 0 0 auto;
    grid-template-columns: max-content;
    gap: 5px;
  }

  .category-tree-node.has-children {
    grid-template-columns: max-content 32px;
  }

  .category-tree-node > .category-button {
    width: max-content;
    max-width: min(62vw, 230px);
    grid-column: 1 / -1;
  }

  .category-tree-node.has-children > .category-button {
    grid-column: 1;
  }

  .category-expand-button {
    width: 32px;
    min-height: 40px;
    border-radius: 11px;
  }

  .category-tree-children {
    grid-column: 1 / -1;
    width: 100%;
    margin-inline: 0;
    padding: 7px;
  }

  .category-tree-children .category-tree-node {
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr);
  }

  .category-tree-children .category-tree-node.has-children {
    grid-template-columns: minmax(0, 1fr) 32px;
  }

  .category-tree-children .category-tree-node > .category-button {
    width: 100%;
    max-width: none;
    grid-column: 1 / -1;
  }

  .category-tree-children .category-tree-node.has-children > .category-button {
    grid-column: 1;
  }

  .category-button:disabled {
    padding-inline: 12px;
  }

  .file-grid {
    grid-template-columns: 1fr;
  }

  .semester-home { padding: 20px 16px; border-radius: 22px; }
  .semester-grid, .category-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .semester-card { min-height: 162px; grid-template-columns: 52px minmax(0, 1fr) 30px; gap: 12px; padding: 18px 15px; border-radius: 18px; }
  .semester-icon { width: 52px; height: 52px; border-radius: 15px; font-size: 1.55rem; }
  .semester-skeleton { min-height: 162px; }
  .category-card { min-height: 120px; grid-template-columns: 50px minmax(0, 1fr) 28px; gap: 5px 11px; padding: 14px; border-radius: 18px; }
  .category-card-icon { width: 50px; height: 50px; border-radius: 15px; }
  .category-card-icon svg { width: 26px; height: 26px; }
  .library-breadcrumbs { gap: 1px; font-size: .87rem; }

  body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .mobile-toolbar {
    position: fixed;
    z-index: 8;
    right: 50%;
    bottom: max(8px, env(safe-area-inset-bottom));
    display: flex;
    width: min(520px, calc(100% - 22px));
    min-height: 66px;
    align-items: center;
    justify-content: space-around;
    gap: 2px;
    padding: 7px 6px;
    transform: translateX(50%);
    border: 1px solid rgb(21 63 56 / 12%);
    border-radius: 21px;
    background: rgb(255 255 255 / 96%);
    box-shadow: 0 8px 30px rgb(18 44 36 / 18%);
    backdrop-filter: blur(16px);
  }

  .mobile-toolbar button,
  .mobile-toolbar a {
    display: flex;
    min-width: 0;
    min-height: 48px;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 13px;
    color: #65766e;
    background: transparent;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-toolbar svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .mobile-toolbar span {
    font-size: 0.62rem;
    font-weight: 600;
    white-space: nowrap;
  }

  .mobile-toolbar .mobile-toolbar-main {
    position: relative;
    top: -8px;
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    min-height: 54px;
    flex: 0 0 54px;
    gap: 2px;
    border: 4px solid var(--paper);
    border-radius: 50%;
    color: #fff;
    background: var(--green);
    box-shadow: 0 5px 14px rgb(21 63 56 / 25%);
  }

  .mobile-toolbar .mobile-toolbar-main svg {
    width: 21px;
    height: 21px;
  }

  .mobile-toolbar .mobile-toolbar-main span {
    display: none;
  }

  .mobile-toolbar button:focus-visible,
  .mobile-toolbar a:focus-visible {
    outline: 3px solid #d5b967;
    outline-offset: 2px;
  }

  .download-progress {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .toast.visible,
  .app-update-prompt {
    bottom: calc(92px + env(safe-area-inset-bottom));
  }

  body:has(.download-progress:not([hidden])) .toast.visible {
    bottom: calc(220px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .page-width {
    width: calc(100% - 28px);
  }

  .hero-content {
    align-items: flex-start;
  }

  .hero-copy {
    max-width: 75%;
  }

  .hero-description {
    font-size: 0.9rem;
  }

  .total-card {
    margin-top: 16px;
  }

  .file-grid {
    grid-template-columns: 1fr;
  }

  .toast {
    bottom: max(16px, env(safe-area-inset-bottom));
    max-width: calc(100% - 24px);
    padding: 12px 15px;
    border-radius: 13px;
    font-size: 0.9rem;
  }

  .download-progress {
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: calc(100% - 20px);
    padding: 13px 14px 12px;
    border-radius: 16px;
  }

  .download-progress-icon {
    width: 39px;
    height: 39px;
  }

  body:has(.download-progress:not([hidden])) .toast.visible {
    bottom: calc(144px + env(safe-area-inset-bottom));
  }

  .file-card {
    min-height: 155px;
  }

  .footer {
    font-size: 0.75rem;
  }
}

@media (max-width: 360px) {
  .page-width {
    width: calc(100% - 30px);
  }

  .topbar {
    gap: 4px;
  }

  .brand {
    gap: 5px;
    font-size: .78rem;
  }

  .brand-mark {
    width: 29px;
    height: 29px;
    border-radius: 9px;
    font-size: 1rem;
  }

  .toolbar {
    gap: 0;
  }

  .toolbar .outline-button {
    width: 31px;
    min-width: 31px;
    min-height: 34px;
    padding: 4px;
  }

  .toolbar-icon {
    width: 17px;
    height: 17px;
  }
}

.hero {
  overflow: visible;
  padding-top: 76px;
  background-color: #121b38;
  background-image:
    repeating-linear-gradient(135deg, transparent 0, transparent 58px, rgb(255 255 255 / 3%) 59px, transparent 60px),
    linear-gradient(118deg, #111a36 0%, #1b2b56 58%, #282453 100%);
}

.topbar {
  position: fixed;
  z-index: 50;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  width: min(1240px, calc(100% - 32px));
  min-height: 62px;
  padding: 8px 14px;
  transform: translateX(-50%);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 14px;
  background: rgb(17 27 55 / 86%);
  box-shadow: 0 12px 32px rgb(8 14 34 / 20%);
  backdrop-filter: blur(18px);
}

.desktop-section-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.desktop-section-nav a {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #dce5ff;
  font-size: .86rem;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.desktop-section-nav a:hover,
.desktop-section-nav a[aria-current="location"] {
  color: #fff;
  background: rgb(255 255 255 / 11%);
}

.hero-content {
  min-height: 270px;
  padding-block: 38px 48px;
}

.hero-copy {
  max-width: 640px;
}

.hero .eyebrow {
  color: #94c8f0;
}

.hero h1 {
  max-width: 15ch;
  color: #fff;
  font-size: 2.25rem;
  letter-spacing: 0;
  line-height: 1.45;
}

.hero-description {
  max-width: 48ch;
  margin-top: 10px;
  color: #d2dcf3;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.hero-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.hero-action:hover {
  transform: translateY(-1px);
}

.hero-action-primary {
  border-color: #d5b967;
  color: #fff;
  background: #17483f;
}

.hero-action-primary:hover {
  background: #22594a;
}

.hero-action-secondary {
  border-color: rgb(203 218 255 / 32%);
  color: #edf5ff;
  background: rgb(255 255 255 / 6%);
}

.hero-action-secondary:hover {
  border-color: rgb(203 218 255 / 58%);
  background: rgb(255 255 255 / 11%);
}

.hero-visual {
  display: grid;
  grid-template-columns: 88px repeat(2, minmax(78px, 1fr));
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgb(220 231 255 / 22%);
  border-radius: 12px;
  background: rgb(13 22 48 / 35%);
}

.hero-visual img {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 9px;
}

.hero-stat {
  display: grid;
  min-width: 72px;
  min-height: 72px;
  align-content: center;
  justify-items: center;
  gap: 2px;
  padding: 8px;
  border-inline-start: 1px solid rgb(220 231 255 / 15%);
  color: #c5d2ef;
  font-size: .78rem;
}

.hero-stat strong {
  color: #8dd4ff;
  font-size: 1.55rem;
  line-height: 1.2;
}

.main-content {
  padding-top: 8px;
}

.controls {
  align-items: center;
  padding-block: 22px 18px;
}

.search-box {
  min-height: 50px;
  border-radius: 10px;
  box-shadow: 0 5px 18px rgb(25 37 75 / 5%);
}

.category-filter-rail,
.personal-panel,
.planner-panel {
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.category-button[aria-pressed="true"] {
  border-color: var(--green-strong);
  background: var(--green-strong);
  box-shadow: 0 5px 14px rgb(81 68 165 / 18%);
}

.category-button:hover,
.category-expand-button:hover {
  border-color: #adc8b8;
}

.personal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-block: 12px 24px;
}

.personal-panel,
.planner-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.personal-heading,
.planner-heading,
.study-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.personal-heading h2,
.planner-heading h2 {
  margin: 0;
  font-size: 1.15rem;
}

.section-kicker {
  margin: 0 0 3px;
  color: var(--green-strong);
  font-size: .74rem;
  font-weight: 700;
}

.personal-count {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  padding-inline: 7px;
  border-radius: 8px;
  color: var(--green-strong);
  background: var(--green-soft);
  font-size: .8rem;
  font-weight: 700;
}

.personal-file-list,
.study-task-list {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.personal-file-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.personal-file-link {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
  color: var(--ink);
  text-decoration: none;
}

.personal-file-link strong,
.personal-file-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-file-link strong {
  font-size: .84rem;
}

.personal-file-link span {
  color: var(--muted);
  font-size: .72rem;
}

.personal-file-link:hover strong {
  color: var(--green-strong);
}

.personal-favorite-toggle,
.file-favorite-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 1.15rem;
  line-height: 1;
}

.personal-favorite-toggle[aria-pressed="true"],
.file-favorite-button[aria-pressed="true"] {
  border-color: #d6b952;
  color: #b88d13;
  background: #fff9e7;
}

.personal-empty {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .82rem;
}

.planner-panel {
  margin-block: 0 30px;
  padding: 20px;
  border-color: color-mix(in srgb, #5f997b 30%, var(--line));
  border-radius: 16px;
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--surface) 87%, transparent),
    color-mix(in srgb, var(--surface) 95%, #d7eee4));
  box-shadow: 0 16px 42px rgb(21 63 56 / 9%),
    inset 0 1px 0 rgb(255 255 255 / 72%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
}

.planner-heading {
  margin-bottom: 16px;
}

.local-data-note {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--green-soft) 72%, var(--surface));
  font-size: .72rem;
  white-space: nowrap;
}

.study-form {
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) minmax(145px, 1fr) minmax(145px, .8fr) minmax(110px, .65fr) auto;
  align-items: end;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}

.study-form label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
}

.study-form input,
.study-form select {
  min-height: 40px;
  font-size: .83rem;
}

.study-add-button {
  min-height: 40px;
  padding-inline: 12px;
  border-radius: 8px;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}

.planner-content {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(230px, .8fr);
  gap: 18px;
  margin-top: 18px;
}

.study-list-heading h3,
.focus-timer h3 {
  margin: 0;
  font-size: .92rem;
}

.study-list-heading > span {
  color: var(--muted);
  font-size: .73rem;
}

.study-task-area {
  min-width: 0;
}

.study-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.study-task-label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
}

.study-task-label input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: var(--green-strong);
}

.study-task-label span {
  overflow-wrap: anywhere;
}

.study-task.is-complete .study-task-label span {
  color: var(--muted);
  text-decoration: line-through;
}

.study-task-detail {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
  color: var(--muted);
  font-size: .7rem;
}

.study-task-detail time.is-overdue {
  color: #b54151;
  font-weight: 700;
}

.task-priority {
  padding: 1px 6px;
  border-radius: 5px;
  color: #55617a;
  background: #edf0f7;
}

.task-priority.is-high {
  color: #a53c51;
  background: #fff0f2;
}

.task-priority.is-low {
  color: #347451;
  background: #eaf6ef;
}

.study-task-delete {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 1.15rem;
}

.study-task-delete:hover {
  border-color: #e6bcc2;
  color: #a72d43;
  background: #fff4f5;
}

.focus-timer {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, #5f997b 32%, var(--line));
  border-radius: 14px;
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--green-soft) 76%, var(--surface)),
    color-mix(in srgb, var(--surface) 94%, #d7eaf0));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 72%);
}

.timer-display {
  color: var(--green);
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.25;
}

.timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timer-actions button {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface);
  font-size: .72rem;
}

.timer-actions button:first-child {
  border-color: var(--green-strong);
  color: #fff;
  background: var(--green-strong);
}

.timer-actions button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.session-total {
  display: flex;
  justify-content: space-between;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: .73rem;
}

.session-total strong {
  color: var(--ink);
}

.study-calendar {
  display: grid;
  gap: 13px;
  min-width: 0;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.calendar-heading,
.personal-reminders-heading,
.student-session-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-heading h3,
.personal-reminders-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.calendar-week-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-week-controls button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--green-strong);
  background: var(--surface);
  font-size: 1.35rem;
  line-height: 1;
}

.calendar-week-controls time {
  min-width: 142px;
  color: var(--muted);
  font-size: .78rem;
  text-align: center;
}

.calendar-filters {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--paper) 65%, transparent);
}

.calendar-filters button {
  min-height: 34px;
  padding: 6px 11px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: .78rem;
  white-space: nowrap;
}

.calendar-filters button[aria-pressed="true"] {
  color: #fff;
  background: var(--green-strong);
}

.calendar-status {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.calendar-day {
  display: grid;
  min-width: 0;
  min-height: 112px;
  align-content: start;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 91%, var(--green-soft));
}

.calendar-day.is-today {
  border-color: color-mix(in srgb, var(--green-strong) 48%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green-strong) 18%, transparent);
}

.calendar-day-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: .73rem;
}

.calendar-day-heading-copy { display: grid; gap: 1px; }
.calendar-day-heading-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.calendar-day-count {
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--paper) 80%, var(--surface));
  font-size: .64rem;
  line-height: 1.35;
  white-space: nowrap;
}
.calendar-day-count.has-events { color: var(--green-strong); background: var(--green-soft); }
.calendar-day-toggle {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-strong);
  background: var(--surface);
  cursor: pointer;
  font-size: .94rem;
  line-height: 1;
  transition: transform 150ms ease, background-color 150ms ease;
}
.calendar-day-toggle[aria-expanded="true"] { transform: rotate(180deg); }
.calendar-day-toggle:focus-visible { outline: 2px solid var(--green-strong); outline-offset: 2px; }
.calendar-day-heading time {
  color: var(--ink);
  font-size: .88rem;
  font-weight: 800;
}

.calendar-event-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.calendar-event-list:empty { display: none; }

.calendar-event {
  padding: 0;
  border-inline-start: 3px solid #458463;
  border-radius: 8px;
  color: var(--ink);
  background: color-mix(in srgb, #6ca885 14%, var(--surface));
  font-size: .72rem;
  overflow-wrap: anywhere;
}

.calendar-event.is-section {
  border-color: #5485a5;
  background: color-mix(in srgb, #78a9c6 15%, var(--surface));
}

.calendar-event.is-exam {
  border-color: #bd8b36;
  background: color-mix(in srgb, #e1bd68 18%, var(--surface));
}

.calendar-event-summary {
  display: flex;
  min-height: 37px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 6px 8px;
  cursor: pointer;
  list-style: none;
}

.calendar-event-summary::-webkit-details-marker { display: none; }
.calendar-event-summary::marker { content: ""; }
.calendar-event-summary strong { min-width: 0; font-size: .74rem; line-height: 1.45; }
.calendar-event-arrow { flex: 0 0 auto; color: var(--muted); font-size: 1rem; transition: transform 150ms ease; }
.calendar-event[open] .calendar-event-arrow { transform: rotate(180deg); }
.calendar-event-details { display: grid; gap: 3px; padding: 0 8px 8px; }
.calendar-event time { color: var(--muted); font-size: .68rem; font-variant-numeric: tabular-nums; }
.calendar-event-details span { color: var(--muted); }
.calendar-day-empty { margin: 0; color: var(--muted); font-size: .7rem; }

.personal-reminders {
  position: relative;
  display: grid;
  gap: 13px;
  overflow: hidden;
  margin-top: 8px;
  padding: 17px;
  border: 1px solid color-mix(in srgb, var(--green-strong) 30%, var(--line));
  border-radius: 16px;
  background: linear-gradient(140deg,
    color-mix(in srgb, var(--green-soft) 65%, var(--surface)),
    color-mix(in srgb, var(--surface) 92%, #d8eaf0));
  box-shadow: 0 10px 26px rgb(21 63 56 / 8%), inset 0 1px 0 rgb(255 255 255 / 76%);
}

.personal-reminders::before {
  position: absolute;
  inset-block: 18px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #4e9a7a, #76adc0);
  content: "";
}

.personal-reminders-heading .section-kicker { margin-bottom: 2px; }
.personal-reminders-heading .local-data-note { flex: 0 0 auto; }
.personal-reminders-heading h3 { line-height: 1.45; }
.student-auth-form,
.student-reminder-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 11px;
}

.student-auth-form > label:not(.student-signup-toggle),
.student-reminder-form > label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: .79rem;
  font-weight: 700;
}

.student-auth-form input:not([type="checkbox"]),
.student-reminder-form input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 1px 2px rgb(15 45 35 / 4%);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.student-auth-form input:not([type="checkbox"]):focus,
.student-reminder-form input:focus {
  border-color: #6d9b83;
  box-shadow: 0 0 0 3px rgb(67 125 91 / 13%);
  outline: none;
}

.student-signup-toggle {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--green-strong) 18%, var(--line));
  border-radius: 10px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 74%, var(--green-soft));
  font-size: .78rem;
  cursor: pointer;
}

.student-signup-toggle input {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #dce4dd;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.student-signup-toggle input::after {
  position: absolute;
  inset-block-start: 2px;
  inset-inline-start: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 20%);
  content: "";
  transition: inset-inline-start 150ms ease;
}

.student-signup-toggle input:checked { border-color: var(--green-strong); background: var(--green-strong); }
.student-signup-toggle input:checked::after { inset-inline-start: 18px; }
.student-signup-toggle:focus-within { outline: 2px solid color-mix(in srgb, #438c6a 55%, transparent); outline-offset: 2px; }
.student-auth-form > button,
.student-reminder-form > button { min-height: 44px; border-radius: 10px; font-size: .84rem; }
.student-auth-form > #student-auth-submit { width: 100%; box-shadow: 0 6px 15px rgb(21 63 56 / 18%); }
.student-session-panel > #student-enable-push {
  min-height: 44px;
  border-color: color-mix(in srgb, var(--green-strong) 30%, var(--line));
  border-radius: 10px;
  color: var(--green-strong);
  background: color-mix(in srgb, var(--green-soft) 70%, var(--surface));
  font-weight: 700;
}
.student-session-heading .study-task-delete {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #eed7d4;
  border-radius: 10px;
  color: #963b33;
  background: #fff8f7;
}
.calendar-account-status { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .8rem; }
.calendar-account-status.is-error { padding: 8px 10px; border-radius: 9px; color: #a43f36; background: #fff0ed; }
.student-session-panel { display: grid; gap: 10px; }
.student-session-heading { min-height: 42px; justify-content: flex-start; color: var(--muted); font-size: .82rem; }
.student-session-heading button { margin-inline-start: auto; }
.student-reminder-form { padding-top: 12px; border-top: 1px solid var(--line); }
.student-reminder-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.student-reminder-item { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.student-reminder-item div { display: grid; min-width: 0; gap: 2px; }
.student-reminder-item strong { overflow-wrap: anywhere; font-size: .82rem; }
.student-reminder-item time,
.student-reminder-item span { color: var(--muted); font-size: .72rem; }

body.dark .personal-reminders {
  border-color: #456255;
  background: linear-gradient(140deg, #20392f, var(--surface));
  box-shadow: 0 12px 28px rgb(0 0 0 / 18%), inset 0 1px 0 rgb(255 255 255 / 7%);
}

body.dark .student-auth-form input:not([type="checkbox"]),
body.dark .student-reminder-form input {
  border-color: var(--line);
  background: #151d1a;
}

body.dark .student-signup-toggle {
  border-color: var(--line);
  color: var(--ink);
  background: #1d3029;
}

body.dark .student-signup-toggle input { border-color: #506457; background: #3c4c42; }
body.dark .student-signup-toggle input:checked { background: #3d795b; }
body.dark .student-session-panel > #student-enable-push { border-color: #456255; color: #dcece2; background: #263f36; }
body.dark .student-session-heading .study-task-delete { border-color: #63403d; color: #ffc0b8; background: #3b2927; }
body.dark .calendar-account-status.is-error { color: #ffc0b8; background: #3b2927; }

.file-card {
  border-radius: 10px;
  border-color: var(--line);
  box-shadow: 0 6px 20px rgb(25 37 75 / 4%);
}

.file-card-top {
  align-items: start;
}

.file-card-top > div {
  flex: 1;
}

.file-favorite-button {
  margin-inline-start: auto;
}

.mobile-more-menu {
  position: fixed;
  z-index: 61;
  left: 14px;
  right: auto;
  bottom: calc(88px + env(safe-area-inset-bottom));
  display: grid;
  width: min(280px, calc(100% - 28px));
  gap: 4px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--green-strong) 24%, transparent);
  border-radius: 16px;
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--surface) 88%, #b8f0dc),
    color-mix(in srgb, var(--surface) 91%, #b8dcf0) 52%,
    color-mix(in srgb, var(--surface) 89%, #f4dfa8));
  box-shadow: 0 20px 48px rgb(12 43 37 / 24%),
    inset 0 1px 0 rgb(255 255 255 / 72%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  backdrop-filter: blur(22px) saturate(165%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(.98);
  transform-origin: left bottom;
  visibility: hidden;
  transition: opacity 170ms ease, transform 170ms ease, visibility 0s linear 170ms;
}

.mobile-more-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
  transition-delay: 0s;
}

.mobile-more-menu::after {
  position: absolute;
  bottom: -7px;
  left: var(--more-pointer-left, 24px);
  width: 12px;
  height: 12px;
  border-right: 1px solid color-mix(in srgb, var(--green-strong) 24%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--green-strong) 24%, transparent);
  background: color-mix(in srgb, var(--surface) 90%, #b8e9d9);
  content: "";
  transform: rotate(45deg);
}

html[lang="ar"] .mobile-more-menu {
  transform-origin: left bottom;
}

html[lang="en"] .mobile-more-menu {
  transform-origin: right bottom;
}

.mobile-more-menu button,
.mobile-more-menu a {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  overflow: hidden;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--more-accent, #4e9a7a) 16%, transparent);
  border-radius: 9px;
  color: var(--ink);
  background: color-mix(in srgb, var(--more-accent, #4e9a7a) 8%, transparent);
  font: inherit;
  font-size: .86rem;
  text-align: start;
  text-decoration: none;
}

.mobile-more-menu > :nth-child(1) { --more-accent: #4e9a7a; }
.mobile-more-menu > :nth-child(2) { --more-accent: #5193bb; }
.mobile-more-menu > :nth-child(3) { --more-accent: #6e8c67; }
.mobile-more-menu > :nth-child(4) { --more-accent: #9a7ab3; }
.mobile-more-menu > :nth-child(5) { --more-accent: #c28c43; }
.mobile-more-menu > :nth-child(6) { --more-accent: #c17469; }

.mobile-more-menu button::before,
.mobile-more-menu a::before {
  position: absolute;
  inset-block: 10px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--more-accent, #4e9a7a);
  content: "";
  opacity: .72;
}

.mobile-more-menu button:hover,
.mobile-more-menu a:hover {
  border-color: color-mix(in srgb, var(--more-accent, #4e9a7a) 32%, transparent);
  color: color-mix(in srgb, var(--more-accent, #4e9a7a) 72%, var(--ink));
  background: color-mix(in srgb, var(--more-accent, #4e9a7a) 16%, var(--surface));
}

.mobile-more-menu button,
.mobile-more-menu a {
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.mobile-nav-indicator {
  display: none;
}

#top,
#library,
#favorites,
#planner {
  scroll-margin-top: 100px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgb(78 182 242 / 68%);
  outline-offset: 2px;
}

body.dark .personal-panel,
body.dark .planner-panel {
  background: var(--surface);
}

body.dark .planner-panel {
  border-color: #3d594d;
  background: linear-gradient(145deg,
    color-mix(in srgb, #2d634d 22%, var(--surface)),
    var(--surface) 76%);
}

body.dark .personal-file-row,
body.dark .study-task {
  background: #121a30;
}

body.dark .study-form {
  border-color: #3c564a;
  background: linear-gradient(145deg, #243b32, var(--surface));
}

body.dark .study-form label {
  color: var(--muted);
}

body.dark .personal-favorite-toggle[aria-pressed="true"],
body.dark .file-favorite-button[aria-pressed="true"] {
  border-color: #746437;
  color: #eed06c;
  background: #302a1d;
}

body.dark .focus-timer {
  border-color: #3d594d;
  background: linear-gradient(145deg, #263f36, var(--surface));
}

body.dark .personal-reminders {
  border-color: #3d594d;
  background: linear-gradient(140deg, #23392f, var(--surface));
}

body.dark .calendar-day {
  border-color: var(--line);
  background: linear-gradient(150deg, #202f29, var(--surface));
}

body.dark .calendar-day.is-today { border-color: #78c29c; }
body.dark .calendar-day-count { color: var(--muted); background: #151d1a; }
body.dark .calendar-day-count.has-events { color: #bde3c7; background: #263f36; }
body.dark .calendar-day-toggle { border-color: var(--line); color: var(--ink); background: #121a30; }
body.dark .calendar-event { color: var(--ink); background: #263f36; }
body.dark .calendar-event.is-section { background: #263c4c; }
body.dark .calendar-event.is-exam { background: #403621; }
body.dark .calendar-event-summary strong { color: var(--ink); }
body.dark .calendar-filters { border-color: var(--line); background: #151d1a; }

@media (max-width: 760px) {
  body {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .topbar {
    width: calc(100% - 20px);
    min-height: 56px;
    padding: 7px 9px;
  }

  .desktop-section-nav {
    display: none;
  }

  .toolbar #install-button {
    display: none;
  }

  .hero {
    padding-top: 72px;
  }

  .hero-content {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    padding-block: 22px 30px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero h1 {
    max-width: 18ch;
    font-size: 1.75rem;
  }

  .hero-actions {
    margin-top: 14px;
  }

  .hero-visual {
    grid-template-columns: 62px repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
  }

  .hero-visual img {
    width: 62px;
    height: 62px;
  }

  .hero-stat {
    min-height: 58px;
  }

  .controls {
    padding-block: 15px 12px;
  }

  .personal-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-block: 8px 18px;
  }

  .personal-panel,
  .planner-panel {
    padding: 14px;
  }

  .study-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-title-field {
    grid-column: 1 / -1;
  }

  .study-add-button {
    width: 100%;
  }

  .planner-content {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .study-calendar { margin-top: 18px; }
  .calendar-heading { align-items: stretch; flex-direction: column; }
  .calendar-week-controls { justify-content: space-between; }
  .calendar-week-controls time { flex: 1; }
  .calendar-filters { width: 100%; }
  .calendar-grid {
    grid-auto-columns: minmax(150px, 1fr);
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 5px;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
  }
  .calendar-day { min-height: 148px; scroll-snap-align: start; }
  .personal-reminders { gap: 12px; padding: 15px 12px; }
  .personal-reminders-heading { align-items: flex-start; }
  .student-auth-form,
  .student-reminder-form { grid-template-columns: 1fr; }
  .student-auth-form > button,
  .student-reminder-form > button { width: 100%; }

  .mobile-toolbar {
    position: fixed;
    z-index: 60;
    right: auto;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 50%;
    display: flex;
    width: min(440px, calc(100% - 24px));
    min-height: 68px;
    align-items: center;
    justify-content: space-around;
    gap: 0;
    padding: 7px 6px;
    transform: translateX(-50%);
    border: 1px solid rgb(200 207 226 / 75%);
    border-radius: 14px;
    background: rgb(255 255 255 / 93%);
    box-shadow: 0 8px 28px rgb(17 27 55 / 17%);
    backdrop-filter: blur(16px);
  }

  .mobile-nav-indicator {
    position: absolute;
    z-index: 0;
    top: 7px;
    left: 0;
    display: block;
    height: 34px;
    border-radius: 8px;
    background: var(--green-soft);
    transition: transform 220ms ease, width 220ms ease;
    pointer-events: none;
  }

  .mobile-toolbar button,
  .mobile-toolbar a {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    min-height: 52px;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 3px 1px;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    text-decoration: none;
  }

  .mobile-toolbar button[aria-current="location"] {
    color: var(--green-strong);
  }

  .mobile-toolbar svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .mobile-toolbar span:not(.mobile-nav-indicator) {
    max-width: 100%;
    overflow: hidden;
    font-size: .64rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-more-menu {
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    transform: none;
  }

  .mobile-nav-indicator {
    transform-origin: left center;
  }

  .download-progress {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 430px) {
  .page-width {
    width: calc(100% - 24px);
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .planner-heading {
    align-items: start;
  }

  .study-task {
    grid-template-columns: minmax(0, 1fr) auto 30px;
    gap: 6px;
  }
}

@media (max-width: 360px) {
  .topbar {
    width: calc(100% - 14px);
  }

  .brand {
    max-width: 124px;
    font-size: .76rem;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .toolbar #share-button {
    display: none;
  }

  .toolbar .outline-button {
    width: 32px;
    min-width: 32px;
    min-height: 34px;
  }

  .hero h1 {
    font-size: 1.48rem;
  }

  .hero-action {
    min-height: 40px;
    padding-inline: 10px;
    font-size: .8rem;
  }

  .study-form {
    gap: 8px;
    padding: 10px;
  }

  .mobile-toolbar span:not(.mobile-nav-indicator) {
    font-size: .58rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.pdf-viewer {
  width: min(1200px, calc(100vw - 28px));
  height: min(88vh, 920px);
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 80px rgb(8 14 34 / 32%);
}

.pdf-viewer[open] {
  display: flex;
  flex-direction: column;
}

.pdf-viewer::backdrop {
  background: rgb(7 12 30 / 72%);
  backdrop-filter: blur(4px);
}

.pdf-viewer-header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.pdf-viewer-header h2 {
  overflow: hidden;
  min-width: 0;
  margin: 0;
  font-size: .9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-viewer-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.pdf-viewer-actions a,
.pdf-viewer-actions button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: .74rem;
  text-decoration: none;
  white-space: nowrap;
}

.pdf-viewer-actions button {
  width: 38px;
  padding: 4px;
  font-size: 1.1rem;
}

.pdf-viewer-actions a:hover,
.pdf-viewer-actions button:hover {
  border-color: #adc8b8;
  color: var(--green-strong);
  background: var(--green-soft);
}

.pdf-viewer-loading {
  margin: 0;
  padding: 6px 12px;
  color: var(--muted);
  background: var(--paper);
  font-size: .75rem;
}

.pdf-viewer iframe {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  flex: 1;
  border: 0;
  background: #242936;
}

body.dark .pdf-viewer,
body.dark .pdf-viewer-header {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

body.dark .pdf-viewer-actions a,
body.dark .pdf-viewer-actions button {
  border-color: var(--line);
  color: var(--ink);
  background: #202945;
}

body.dark .pdf-viewer-loading {
  color: var(--muted);
  background: #121a30;
}

@media (max-width: 600px) {
  .pdf-viewer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .pdf-viewer-header {
    align-items: start;
    gap: 7px;
    padding: 8px;
  }

  .pdf-viewer-header h2 {
    max-width: 24vw;
    padding-top: 7px;
  }

  .pdf-viewer-actions {
    flex-wrap: wrap;
    justify-content: end;
    gap: 4px;
  }

  .pdf-viewer-actions a {
    min-height: 34px;
    padding: 5px 7px;
    font-size: .68rem;
  }

  .pdf-viewer-actions button {
    width: 34px;
    min-height: 34px;
  }
}

.hero {
  background-color: #153f38;
  background-image:
    repeating-linear-gradient(135deg, transparent 0, transparent 58px, rgb(255 255 255 / 3%) 59px, transparent 60px),
    linear-gradient(118deg, #12372f 0%, #17483f 58%, #22594a 100%);
}

.topbar {
  border-color: rgb(245 247 241 / 18%);
  background: rgb(21 63 56 / 94%);
  box-shadow: 0 12px 32px rgb(8 25 20 / 24%);
}

.brand-mark {
  border-color: rgb(213 185 103 / 45%);
  color: #d5b967;
  background: rgb(213 185 103 / 9%);
}

.desktop-section-nav a:hover,
.desktop-section-nav a[aria-current="location"] {
  background: rgb(213 185 103 / 17%);
}

.outline-button {
  border-color: rgb(245 247 241 / 24%);
}

.hero .eyebrow {
  color: #e3cc83;
}

.hero-description {
  color: #d7e3dc;
}

.hero-action-primary {
  border-color: #d5b967;
  background: #17483f;
}

.hero-action-primary:hover {
  background: #22594a;
}

.hero-action-secondary {
  border-color: rgb(245 247 241 / 34%);
  color: #f5f7f1;
}

.hero-visual {
  border-color: rgb(245 247 241 / 24%);
  background: rgb(11 38 32 / 42%);
}

.hero-stat strong {
  color: #e3c86f;
}

.section-kicker {
  color: #527d6f;
}

.personal-favorite-toggle[aria-pressed="true"],
.file-favorite-button[aria-pressed="true"] {
  border-color: #d5b967;
  color: #8b6b13;
  background: #fff9e7;
}

.category-button:hover,
.category-expand-button:hover,
.pdf-viewer-actions a:hover,
.pdf-viewer-actions button:hover {
  border-color: #adc8b8;
}

.mobile-nav-indicator {
  top: auto;
  bottom: 6px;
  width: 6px !important;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 9px rgb(213 185 103 / 48%);
}

@media (max-width: 760px) {
  .mobile-toolbar {
    direction: ltr;
    width: min(460px, calc(100% - 24px));
    min-height: 76px;
    padding: 8px 11px;
    border-color: rgb(245 247 241 / 24%);
    border-radius: 40px;
    background: rgb(21 63 56 / 74%);
    box-shadow: 0 12px 30px rgb(12 32 26 / 30%),
      inset 0 1px 0 rgb(255 255 255 / 18%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
  }

  .mobile-toolbar button,
  .mobile-toolbar a {
    min-height: 54px;
    gap: 0;
    padding: 0;
    color: #f5f7f1;
  }

  .mobile-toolbar button[aria-current="location"] {
    color: var(--gold);
    background: transparent;
  }

  .mobile-toolbar svg {
    width: 25px;
    height: 25px;
  }

  .mobile-toolbar #more-menu-button {
    width: 52px;
    height: 52px;
    min-height: 52px;
    max-width: 52px;
    flex: 0 0 52px;
    padding: 0;
    border: 3px solid #153f38;
    border-radius: 50%;
    color: #153f38;
    background: var(--gold);
    box-shadow: 0 3px 12px rgb(0 0 0 / 24%);
  }

  .mobile-toolbar #more-menu-button svg {
    width: 27px;
    height: 27px;
    stroke-width: 2.2;
  }

  .mobile-toolbar span:not(.mobile-nav-indicator) {
    display: none;
  }

  .mobile-more-menu {
    left: 14px;
    right: auto;
    bottom: calc(92px + env(safe-area-inset-bottom));
  }
}

body.dark .mobile-toolbar {
  border-color: rgb(245 247 241 / 22%);
  background: rgb(15 43 37 / 76%);
  box-shadow: 0 12px 30px rgb(0 0 0 / 34%),
    inset 0 1px 0 rgb(255 255 255 / 12%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
}

body.dark .mobile-toolbar button,
body.dark .mobile-toolbar a {
  color: #f5f7f1;
}

body.dark .mobile-toolbar button[aria-current="location"] {
  color: #e3c86f;
}

body.dark .mobile-toolbar #more-menu-button {
  border-color: #0f2b25;
  color: #153f38;
  background: #d5b967;
}

body.dark .hero .eyebrow,
body.dark .hero-stat strong {
  color: #e3c86f;
}

html[lang="ar"] .mobile-toolbar {
  direction: rtl;
}

html[lang="en"] .mobile-toolbar {
  direction: ltr;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
}

.desktop-section-nav {
  justify-content: center;
}

.toolbar {
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
}

.timer-duration-control,
.timer-duration-inputs,
.timer-duration-input {
  display: flex;
  align-items: center;
  gap: 7px;
}

.timer-duration-control {
  justify-content: space-between;
  color: var(--muted);
  font-size: .8rem;
}

.timer-duration-inputs {
  gap: 10px;
}

.timer-duration-input {
  gap: 4px;
  color: var(--ink);
  font-size: .76rem;
}

.timer-duration-input input {
  width: 58px;
  min-height: 34px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: inherit;
  background: var(--surface);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.timer-duration-input input:disabled {
  color: var(--muted);
  background: var(--paper);
}

@media (min-width: 761px) and (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding-inline: 10px;
  }

  .desktop-section-nav {
    gap: 0;
  }

  .desktop-section-nav a {
    padding-inline: 8px;
    font-size: .82rem;
  }

  .toolbar {
    gap: 4px;
  }

  .toolbar .outline-button {
    width: 38px;
    min-width: 38px;
    padding-inline: 8px;
  }

  .toolbar .outline-button > span:not(.notification-badge):not([aria-hidden="true"]) {
    display: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    display: flex;
    justify-content: space-between;
    gap: 8px;
  }
}

.planner-heading {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.study-form {
  gap: 12px;
  padding: 16px;
  border-color: color-mix(in srgb, #5f997b 28%, var(--line));
  border-radius: 14px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--green-soft) 56%, var(--surface)),
    color-mix(in srgb, var(--surface) 94%, #d7eaf0));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 78%);
}

.study-form label {
  gap: 7px;
  color: #52645d;
  font-size: .78rem;
}

.study-form input:not([type="checkbox"]),
.study-form select {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 8px 11px;
  border: 1px solid #d7e0d9;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.study-form input:not([type="checkbox"]):focus,
.study-form select:focus {
  border-color: #6d9b83;
  box-shadow: 0 0 0 3px rgb(67 125 91 / 12%);
  outline: none;
}

.study-add-button {
  min-height: 43px;
  padding-inline: 16px;
  box-shadow: 0 4px 10px rgb(21 63 56 / 15%);
  white-space: nowrap;
}

.study-add-button:hover {
  transform: translateY(-1px);
}

.study-list-heading {
  min-height: 40px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.study-list-heading h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1rem;
}

.study-list-heading h3::before {
  width: 4px;
  height: 20px;
  border-radius: 4px;
  background: var(--gold);
  content: "";
}

.study-list-heading > span {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--green-strong);
  background: var(--green-soft);
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

.study-task-list {
  gap: 9px;
  margin-top: 0;
}

.study-task {
  min-height: 64px;
  padding: 10px 12px;
  border-color: #e1e8e2;
  border-radius: 9px;
  background: var(--surface);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.study-task:hover {
  transform: translateY(-1px);
  border-color: #b9ccbf;
  box-shadow: 0 5px 14px rgb(24 50 42 / 6%);
}

.study-task-label {
  gap: 10px;
  line-height: 1.55;
}

.study-task-label input {
  margin-top: 3px;
}

.study-task-detail {
  align-items: center;
  gap: 6px;
  overflow-wrap: anywhere;
  font-size: .72rem;
}

.task-priority {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}

.study-task-delete {
  border-radius: 8px;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.study-task-area > .personal-empty {
  display: grid;
  min-height: 116px;
  place-items: center;
  margin: 0;
  padding: 18px;
  border: 1px dashed #cbd9ce;
  border-radius: 10px;
  color: #65766d;
  background: #f7f9f6;
  text-align: center;
  line-height: 1.8;
}

@media (max-width: 760px) {
  .planner-heading {
    margin-bottom: 16px;
  }

  .study-form {
    gap: 11px;
    padding: 13px;
  }

  .study-add-button {
    grid-column: 1 / -1;
  }

  .study-list-heading {
    margin-bottom: 10px;
  }

  .study-task {
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 4px 8px;
    padding: 10px;
  }

  .study-task-detail {
    grid-column: 1;
    justify-content: flex-start;
    margin-inline-start: 27px;
  }

  .study-task-delete {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .semester-card, .category-card { transition: none; }
  .semester-skeleton { animation: none; }
}
