/* ============================================================
   Dr. Keshav — Education Website
   Design System based on Qatchup Style Reference
   ============================================================ */

/* --- Google Fonts (Inter = Aspekta substitute, Fasthand = accent) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Fasthand&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --color-charcoal: #080808;
  --color-graphite: #222222;
  --color-mid-ink: #292929;
  --color-steel: #696969;
  --color-fog: #999999;
  --color-ash: #b2b2b2;
  --color-slate: #8d8d8d;
  --color-mist: #cccccc;
  --color-silk: #e4e4e7;
  --color-bone: #fafafa;
  --color-cream: #f4f4f5;

  /* Typography — Font Families */
  --font-aspekta: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-fasthand: 'Fasthand', cursive;

  /* Typography — Scale */
  --text-caption: 12px;
  --leading-caption: 1.5;
  --tracking-caption: -0.12px;

  --text-body-sm: 14px;
  --leading-body-sm: 1.43;
  --tracking-body-sm: -0.14px;

  --text-body: 16px;
  --leading-body: 1.5;
  --tracking-body: -0.16px;

  --text-body-lg: 18px;
  --leading-body-lg: 1.56;
  --tracking-body-lg: -0.2px;

  --text-subheading: 20px;
  --leading-subheading: 1.4;
  --tracking-subheading: -0.34px;

  --text-heading-sm: 24px;
  --leading-heading-sm: 1.38;
  --tracking-heading-sm: -0.38px;

  --text-heading: 32px;
  --leading-heading: 1.38;
  --tracking-heading: -0.54px;

  --text-heading-lg: 40px;
  --leading-heading-lg: 1.25;
  --tracking-heading-lg: -0.8px;

  --text-display: 48px;
  --leading-display: 1.2;
  --tracking-display: -1.44px;

  --text-display-lg: 56px;
  --leading-display-lg: 1.14;
  --tracking-display-lg: -1.96px;

  /* Typography — Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;

  /* Spacing */
  --spacing-4: 4px;
  --spacing-8: 8px;
  --spacing-12: 12px;
  --spacing-16: 16px;
  --spacing-20: 20px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-40: 40px;
  --spacing-48: 48px;
  --spacing-56: 56px;
  --spacing-60: 60px;
  --spacing-64: 64px;
  --spacing-100: 100px;

  /* Layout */
  --page-max-width: 1200px;

  /* Border Radius */
  --radius-cards: 32px;
  --radius-pills: 999px;
  --radius-images: 16px;
  --radius-buttons: 100px;
  --radius-small-images: 12px;

  /* Shadows */
  --shadow-subtle: rgba(19, 19, 22, 0.05) 0px 0px 0px 1px,
                   rgba(0, 0, 0, 0.04) 0px 2px 3px 0px,
                   rgba(34, 42, 53, 0.04) 0px 4px 6px 0px,
                   rgba(0, 0, 0, 0.05) 0px 1px 1px 0px;
  --shadow-subtle-2: rgba(19, 19, 22, 0.05) 0px 0px 0px 1px,
                     rgba(0, 0, 0, 0.04) 0px 2px 3px 0px,
                     rgba(47, 48, 55, 0.05) 0px 24px 68px 0px,
                     rgba(34, 42, 53, 0.04) 0px 4px 6px 0px,
                     rgba(0, 0, 0, 0.05) 0px 1px 1px 0px;
  --shadow-lg: rgba(16, 24, 40, 0.08) 0px 17px 23px -6px,
               rgba(16, 24, 40, 0.03) 0px 6px 9px -3px;
  --shadow-subtle-3: rgba(0, 0, 0, 0.2) 0px 0px 0.5px 0.5px,
                     rgba(0, 0, 0, 0.08) 0px 1px 1px -0.5px,
                     rgba(0, 0, 0, 0.1) 0px 2px 4px 0px;

  /* Surfaces */
  --surface-canvas: #fafafa;
  --surface-card: #fafafa;
  --surface-secondary: #f4f4f5;
  --surface-dark: #292929;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-aspekta);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  color: var(--color-graphite);
  background-color: var(--surface-canvas);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.text-display-lg {
  font-size: var(--text-display-lg);
  line-height: var(--leading-display-lg);
  letter-spacing: var(--tracking-display-lg);
  color: var(--color-charcoal);
  font-weight: var(--font-weight-regular);
}

.text-display {
  font-size: var(--text-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  color: var(--color-charcoal);
  font-weight: var(--font-weight-regular);
}

.text-heading-lg {
  font-size: var(--text-heading-lg);
  line-height: var(--leading-heading-lg);
  letter-spacing: var(--tracking-heading-lg);
  color: var(--color-charcoal);
  font-weight: var(--font-weight-regular);
}

.text-heading {
  font-size: var(--text-heading);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  color: var(--color-charcoal);
  font-weight: var(--font-weight-regular);
}

.text-heading-sm {
  font-size: var(--text-heading-sm);
  line-height: var(--leading-heading-sm);
  letter-spacing: var(--tracking-heading-sm);
  color: var(--color-charcoal);
  font-weight: var(--font-weight-regular);
}

.text-subheading {
  font-size: var(--text-subheading);
  line-height: var(--leading-subheading);
  letter-spacing: var(--tracking-subheading);
}

.text-body-lg {
  font-size: var(--text-body-lg);
  line-height: var(--leading-body-lg);
  letter-spacing: var(--tracking-body-lg);
}

.text-body-sm {
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
  letter-spacing: var(--tracking-body-sm);
}

.text-caption {
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  letter-spacing: var(--tracking-caption);
}

.text-muted {
  color: var(--color-steel);
}

.text-accent {
  font-family: var(--font-fasthand);
  font-size: var(--text-heading);
  line-height: var(--leading-heading);
  letter-spacing: -0.010em;
  color: var(--color-steel);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.page-container {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-40);
}

.section {
  padding: var(--spacing-100) 0;
}

.section--sm {
  padding: var(--spacing-64) 0;
}

.two-col {
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: var(--spacing-48);
  align-items: start;
}

/* ============================================================
   COMPONENTS — Navigation Bar
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-silk);
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-subtle-3);
}

.navbar__inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-40);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-12);
}

.navbar__logo {
  font-size: var(--text-heading-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-heading-sm);
  color: var(--color-charcoal);
}

.navbar__logo-dot {
  color: var(--color-steel);
}

.navbar__center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-fasthand);
  font-size: 30px;
  color: var(--color-charcoal);
}

.navbar__links {
  display: none;
}

.navbar__links.open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--surface-canvas);
  padding: 64px var(--spacing-24) var(--spacing-24) var(--spacing-24);
  border-bottom: 1px solid var(--color-silk);
  box-shadow: var(--shadow-subtle);
  gap: var(--spacing-16);
  z-index: 999;
}

.navbar__links.open .theme-toggle {
  position: absolute !important;
  top: 16px !important;
  right: 24px !important;
  left: auto !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 1000 !important;
}

.navbar__link {
  font-size: var(--text-body);
  font-weight: var(--font-weight-regular);
  color: var(--color-mid-ink);
  transition: color 0.2s ease;
  position: relative;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-charcoal);
  transition: width 0.3s ease;
}

.navbar__link:hover::after,
.navbar__link.active::after {
  width: 100%;
}

.navbar__link:hover {
  color: var(--color-charcoal);
}

/* Mobile menu */
.navbar__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
}

.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-charcoal);
  transition: all 0.3s ease;
}

.navbar__hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}

.navbar__hamburger.open span:nth-child(2) {
  opacity: 0;
}

.navbar__hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}

/* ============================================================
   COMPONENTS — Buttons
   ============================================================ */
.btn-pill-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-8);
  padding: 11px 22px;
  background: var(--color-mid-ink);
  color: var(--color-bone);
  font-family: var(--font-aspekta);
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-buttons);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-pill-dark:hover {
  background: var(--color-charcoal);
  transform: translateY(-1px);
  box-shadow: var(--shadow-subtle-3);
}

.btn-pill-dark:active {
  transform: translateY(0);
}

.btn-pill-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-8);
  padding: 11px 22px;
  background: var(--color-cream);
  color: var(--color-mid-ink);
  font-family: var(--font-aspekta);
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-buttons);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-pill-light:hover {
  background: var(--color-silk);
  transform: translateY(-1px);
}

.btn-pill-light:active {
  transform: translateY(0);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--color-silk);
  color: var(--color-mid-ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--color-cream);
  border-color: var(--color-ash);
}

.btn-icon.active {
  background: var(--color-mid-ink);
  color: var(--color-bone);
  border-color: var(--color-mid-ink);
}

/* ============================================================
   COMPONENTS — Floating Cards
   ============================================================ */
.floating-card {
  background: var(--surface-card);
  border-radius: var(--radius-cards);
  padding: var(--spacing-32);
  box-shadow: var(--shadow-subtle);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.floating-card:hover {
  box-shadow: var(--shadow-subtle-2);
  transform: translateY(-2px);
}

.floating-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-20);
  color: var(--color-mid-ink);
}

.floating-card__icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}

.floating-card__title {
  font-size: var(--text-body-lg);
  font-weight: var(--font-weight-medium);
  color: var(--color-charcoal);
  letter-spacing: var(--tracking-body-lg);
  margin-bottom: var(--spacing-8);
}

.floating-card__desc {
  font-size: var(--text-body-sm);
  color: var(--color-steel);
  line-height: var(--leading-body-sm);
}

/* ============================================================
   COMPONENTS — Hairline Divider
   ============================================================ */
.divider {
  border: none;
  height: 1px;
  background: var(--color-silk);
}

.divider--dark {
  background: var(--color-ash);
}

/* ============================================================
   HOME PAGE — Hero
   ============================================================ */
.hero {
  position: relative;
  padding: 160px 0 var(--spacing-100);
  text-align: center;
  overflow: hidden;
}

.hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-silk) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-silk) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__accent {
  font-family: var(--font-fasthand);
  font-size: var(--text-heading);
  color: var(--color-steel);
  letter-spacing: -0.01em;
  margin-bottom: var(--spacing-16);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero__title {
  font-size: var(--text-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  color: var(--color-charcoal);
  font-weight: var(--font-weight-regular);
  max-width: 720px;
  margin: 0 auto var(--spacing-24);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

.hero__subtitle {
  font-size: var(--text-body-lg);
  line-height: var(--leading-body-lg);
  color: var(--color-steel);
  max-width: 520px;
  margin: 0 auto var(--spacing-40);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.6s forwards;
}

.hero__actions {
  display: flex;
  gap: var(--spacing-16);
  justify-content: center;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.8s forwards;
}

/* ============================================================
   HOME PAGE — Features
   ============================================================ */
.features {
  padding: var(--spacing-100) 0;
}

.features__header {
  margin-bottom: var(--spacing-64);
}

.features__accent {
  font-family: var(--font-fasthand);
  font-size: var(--text-heading-sm);
  color: var(--color-steel);
  margin-bottom: var(--spacing-12);
}

.features__title {
  font-size: var(--text-heading-lg);
  line-height: var(--leading-heading-lg);
  letter-spacing: var(--tracking-heading-lg);
  color: var(--color-charcoal);
  font-weight: var(--font-weight-regular);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-24);
}

/* ============================================================
   HOME PAGE — CTA Section
   ============================================================ */
.cta-section {
  padding: var(--spacing-100) 0;
  text-align: center;
}

.cta-section__card {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--spacing-56) var(--spacing-48);
  text-align: center;
}

.cta-section__accent {
  font-family: var(--font-fasthand);
  font-size: var(--text-heading-sm);
  color: var(--color-steel);
  margin-bottom: var(--spacing-16);
}

.cta-section__title {
  font-size: var(--text-heading);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  color: var(--color-charcoal);
  margin-bottom: var(--spacing-16);
}

.cta-section__desc {
  font-size: var(--text-body-lg);
  color: var(--color-steel);
  line-height: var(--leading-body-lg);
  margin-bottom: var(--spacing-32);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   HOME PAGE — Footer
   ============================================================ */
.footer {
  padding: var(--spacing-40) 0;
  border-top: 1px solid var(--color-silk);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__brand {
  font-size: var(--text-body-sm);
  color: var(--color-steel);
}

.footer__links {
  display: flex;
  gap: var(--spacing-24);
}

.footer__link {
  font-size: var(--text-body-sm);
  color: var(--color-steel);
  transition: color 0.2s ease;
}

.footer__link:hover {
  color: var(--color-charcoal);
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-hero {
  padding: 160px 0 0;
  position: relative;
}

.about-hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-silk) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-silk) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 70%);
  pointer-events: none;
}

.about-hero__content {
  position: relative;
  z-index: 1;
}

.about-bio {
  padding: var(--spacing-24) 0 var(--spacing-100);
}

.about-bio__image-col {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-24);
}

.about-bio__image-wrapper {
  border-radius: var(--radius-images);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3/4;
  background: var(--color-cream);
}

.about-bio__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-bio__credentials {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
}

.about-bio__credential {
  display: flex;
  align-items: center;
  gap: var(--spacing-8);
  font-size: var(--text-body-sm);
  color: var(--color-steel);
}

.about-bio__credential svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.about-bio__text-col {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-24);
}

.about-bio__text {
  font-size: var(--text-body-lg);
  line-height: var(--leading-body-lg);
  letter-spacing: var(--tracking-body-lg);
  color: var(--color-steel);
}

.about-expertise {
  padding: var(--spacing-64) 0 var(--spacing-100);
}

.about-expertise__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-24);
  margin-top: var(--spacing-48);
}

.about-contact {
  padding: var(--spacing-64) 0;
  text-align: center;
}

.about-contact__card {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--spacing-48);
}

/* ============================================================
   NOTES PAGE — Layout
   ============================================================ */
.notes-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--color-cream);
}

/* Top Bar */
.notes-topbar {
  height: 56px;
  background: var(--surface-canvas);
  border-bottom: 1px solid var(--color-silk);
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-20);
  gap: var(--spacing-16);
  flex-shrink: 0;
  z-index: 100;
  position: relative;
}

.notes-topbar__back {
  display: flex;
  align-items: center;
  gap: var(--spacing-8);
  font-size: var(--text-body-sm);
  color: var(--color-steel);
  transition: color 0.2s;
}

.notes-topbar__back:hover {
  color: var(--color-charcoal);
}

.notes-topbar__back svg {
  width: 18px;
  height: 18px;
}

.notes-topbar__divider {
  display: none !important;
}

.notes-topbar__title {
  display: none !important;
}

.notes-topbar__page-info {
  font-size: var(--text-body-sm);
  color: var(--color-steel);
  white-space: nowrap;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--spacing-4);
}

.notes-topbar__page-input {
  width: 44px;
  text-align: center;
  font-family: var(--font-aspekta);
  font-size: var(--text-body-sm);
  color: var(--color-charcoal);
  background: var(--color-cream);
  border: 1px solid var(--color-silk);
  border-radius: 6px;
  padding: 3px 4px;
  outline: none;
  transition: border-color 0.2s;
}

.notes-topbar__page-input:focus {
  border-color: var(--color-steel);
}

.notes-topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-8);
  margin-left: auto;
}

/* Collab badge */
.collab-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-4);
  padding: 4px 12px;
  background: var(--color-cream);
  border: 1px solid var(--color-silk);
  border-radius: var(--radius-pills);
  font-size: var(--text-caption);
  color: var(--color-steel);
  cursor: pointer;
  transition: all 0.2s;
}

.collab-badge:hover {
  border-color: var(--color-ash);
  background: var(--surface-canvas);
}

.collab-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Main viewer area */
.notes-main {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* Thumbnail sidebar */
.notes-sidebar {
  width: 200px;
  background: var(--surface-canvas);
  border-right: 1px solid var(--color-silk);
  overflow-y: auto;
  padding: var(--spacing-12);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
  flex-shrink: 0;
  transition: width 0.3s ease, opacity 0.3s ease;
}

.notes-sidebar.collapsed {
  width: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
}

.notes-sidebar__thumb {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
  position: relative;
  flex-shrink: 0;
}

.notes-sidebar__thumb.active {
  border-color: var(--color-mid-ink);
}

.notes-sidebar__thumb:hover {
  border-color: var(--color-ash);
}

.notes-sidebar__thumb canvas {
  width: 100%;
  display: block;
}

.notes-sidebar__thumb-num {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 10px;
  color: var(--color-steel);
  background: rgba(250, 250, 250, 0.85);
  padding: 1px 6px;
  border-radius: 4px;
}

.notes-sidebar__thumb-placeholder {
  width: 100%;
  aspect-ratio: 595 / 842;
  background: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-steel);
  font-family: var(--font-aspekta);
  border-radius: 6px;
  overflow: hidden;
}

html[data-theme="dark"] .notes-sidebar__thumb-placeholder {
  background: #181818;
}


/* PDF viewer container */
.pdf-viewer {
  position: relative;
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Enable smooth inertial physics scrolling on iOS */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--spacing-24) var(--spacing-16);
  gap: var(--spacing-16);
}

.pdf-page-wrapper {
  position: relative;
  box-shadow: var(--shadow-subtle-3);
  border-radius: 4px;
  overflow: hidden;
  background: white;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: auto;
  width: calc(var(--native-width, 595.276px) * var(--pdf-scale, 1.5));
  height: calc(var(--native-height, 841.89px) * var(--pdf-scale, 1.5));
}

.pdf-page-wrapper canvas {
  display: block;
}

/* Annotation overlay per page */
.annotation-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.annotation-layer.active {
  pointer-events: auto;
  cursor: crosshair;
}

.annotation-layer.active .annotation {
  pointer-events: none !important;
}

.annotation-layer .annotation {
  position: absolute;
  pointer-events: auto;
}

.annotation--highlight {
  background: rgba(255, 235, 59, 0.35);
  border-radius: 2px;
  mix-blend-mode: multiply;
  cursor: pointer;
  transition: background 0.15s;
}

.annotation--highlight:hover {
  background: rgba(255, 235, 59, 0.55);
}

.annotation--highlight.color-green {
  background: rgba(76, 175, 80, 0.3);
}
.annotation--highlight.color-green:hover {
  background: rgba(76, 175, 80, 0.5);
}

.annotation--highlight.color-blue {
  background: rgba(66, 165, 245, 0.3);
}
.annotation--highlight.color-blue:hover {
  background: rgba(66, 165, 245, 0.5);
}
.annotation--highlight.color-pink {
  background: rgba(233, 30, 99, 0.25);
}
.annotation--highlight.color-pink:hover {
  background: rgba(233, 30, 99, 0.45);
}

.annotation--highlight.color-red {
  background: rgba(244, 67, 54, 0.3);
}
.annotation--highlight.color-red:hover {
  background: rgba(244, 67, 54, 0.5);
}

.annotation--underline {
  border-bottom: 2px solid var(--color-mid-ink);
  cursor: pointer;
}

.annotation--sticky {
  width: 260px;
  min-height: 80px;
  background: #fff9c4;
  border-radius: 8px;
  padding: var(--spacing-12);
  box-shadow: var(--shadow-subtle-3);
  cursor: move;
  font-size: 16px !important;
  z-index: 20;
  touch-action: none;
}

.annotation--sticky.color-yellow {
  background: #fff9c4;
}
.annotation--sticky.color-green {
  background: #c8e6c9;
}
.annotation--sticky.color-blue {
  background: #bbdefb;
}
.annotation--sticky.color-pink {
  background: #f8bbd0;
}
.annotation--sticky.color-red {
  background: #ffcdd2;
}

.annotation--sticky__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-8);
}

.annotation--sticky__author {
  font-size: 11px;
  color: var(--color-steel);
  font-weight: var(--font-weight-medium);
}

.annotation--sticky__close {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-ash);
  border-radius: 50%;
  transition: all 0.15s;
}

.annotation--sticky__close:hover {
  color: var(--color-charcoal);
  background: rgba(0,0,0,0.06);
}

.annotation--sticky textarea {
  width: 100%;
  min-height: 50px;
  border: none;
  background: transparent;
  font-family: var(--font-aspekta);
  font-size: 16px !important;
  color: var(--color-graphite);
  resize: vertical;
  outline: none;
  line-height: 1.4;
  touch-action: auto;
}

/* ============================================================
   ANNOTATION TOOLBAR
   ============================================================ */
.annotation-toolbar {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
  padding: var(--spacing-12);
  background: var(--surface-canvas);
  border-radius: 20px;
  box-shadow: var(--shadow-subtle-2);
  border: 1px solid var(--color-silk);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.3s ease;
}

/* Desktop layout: adjust toolbar to slide alongside the left sidebar */
@media (min-width: 769px) {
  .annotation-toolbar {
    left: 220px; /* Shifted when sidebar is open */
  }
  body.sidebar-collapsed .annotation-toolbar {
    left: 20px; /* Default left edge alignment */
  }
}

.annotation-toolbar .btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: none;
  position: relative;
}

.annotation-toolbar .btn-icon svg {
  width: 20px;
  height: 20px;
}

.annotation-toolbar .btn-icon.active {
  background: var(--color-mid-ink);
  color: var(--color-bone);
}

.annotation-toolbar .toolbar-divider {
  width: 24px;
  height: 1px;
  background: var(--color-silk);
  margin: 2px auto;
}

/* Color picker sub-menu */
.color-picker {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: var(--spacing-4);
  padding: 6px 10px;
  background: var(--surface-canvas);
  border-radius: 12px;
  box-shadow: var(--shadow-subtle-2);
  border: 1px solid var(--color-silk);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(-50%) translateX(-4px);
}

.color-picker.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.active {
  border-color: var(--color-mid-ink);
}

.color-swatch--yellow { background: rgba(255, 235, 59, 0.7); }
.color-swatch--green { background: rgba(76, 175, 80, 0.6); }
.color-swatch--blue { background: rgba(66, 165, 245, 0.6); }
.color-swatch--pink { background: rgba(233, 30, 99, 0.5); }
.color-swatch--red { background: rgba(244, 67, 54, 0.6); }

/* ============================================================
   COLLABORATION PANEL
   ============================================================ */
.collab-panel {
  width: 280px;
  background: var(--surface-canvas);
  border-left: 1px solid var(--color-silk);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.collab-panel.collapsed {
  width: 0;
  border: none;
  opacity: 0;
}

.collab-panel__header {
  padding: var(--spacing-16) var(--spacing-20);
  border-bottom: 1px solid var(--color-silk);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.collab-panel__title {
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-charcoal);
}

.collab-panel__body {
  flex: 1;
  padding: var(--spacing-16) var(--spacing-20);
  overflow-y: auto;
}

.collab-panel__section-title {
  font-size: var(--text-caption);
  font-weight: var(--font-weight-medium);
  color: var(--color-fog);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-12);
}

.collab-panel__user {
  display: flex;
  align-items: center;
  gap: var(--spacing-12);
  padding: var(--spacing-8) 0;
}

.collab-panel__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: white;
  flex-shrink: 0;
}

.collab-panel__username {
  font-size: var(--text-body-sm);
  color: var(--color-graphite);
}

.collab-panel__you-tag {
  font-size: 11px;
  color: var(--color-fog);
  margin-left: var(--spacing-4);
}

.collab-panel__footer {
  padding: var(--spacing-16) var(--spacing-20);
  border-top: 1px solid var(--color-silk);
}

.collab-panel__powered {
  text-align: center;
  padding: var(--spacing-16) var(--spacing-20);
  border-top: 1px solid var(--color-silk);
  font-size: 11px;
}

.collab-panel__powered a,
.modal__powered a {
  color: var(--color-steel);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.collab-panel__powered a:hover,
.modal__powered a:hover {
  opacity: 1;
}

.modal__powered {
  text-align: center;
  margin-top: var(--spacing-24);
  font-size: 11px;
}


/* Share link box */
.share-box {
  display: flex;
  gap: var(--spacing-8);
}

.share-box__input {
  flex: 1;
  padding: 8px 12px;
  background: var(--color-cream);
  border: 1px solid var(--color-silk);
  border-radius: 8px;
  font-family: var(--font-aspekta);
  font-size: var(--text-caption);
  color: var(--color-graphite);
  outline: none;
  min-width: 0;
}

.share-box__input:focus {
  border-color: var(--color-steel);
}

.share-box__btn {
  padding: 8px 14px;
  background: var(--color-mid-ink);
  color: var(--color-bone);
  border-radius: 8px;
  font-size: var(--text-caption);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  border: none;
  font-family: var(--font-aspekta);
}

.share-box__btn:hover {
  background: var(--color-charcoal);
}

/* Remote cursor */
.remote-cursor {
  position: absolute;
  pointer-events: none;
  z-index: 50;
  transition: left 0.15s ease, top 0.15s ease;
}

.remote-cursor__pointer {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid currentColor;
  transform: rotate(-30deg);
}

.remote-cursor__label {
  position: absolute;
  top: 12px;
  left: 8px;
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: white;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  background: currentColor;
}

.remote-cursor__label span {
  color: white;
}

/* ============================================================
   ZOOM CONTROLS
   ============================================================ */
.zoom-controls {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--spacing-4);
  padding: 6px 12px;
  background: var(--surface-canvas);
  border-radius: var(--radius-pills);
  box-shadow: var(--shadow-subtle-2);
  border: 1px solid var(--color-silk);
  z-index: 200;
}

.zoom-controls__level {
  font-size: var(--text-body-sm);
  color: var(--color-steel);
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   SHARE MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.3);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface-canvas);
  border-radius: var(--radius-cards);
  padding: var(--spacing-40);
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-subtle-2);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.3s ease;
}

.modal-overlay.visible .modal {
  transform: translateY(0) scale(1);
}

.modal__title {
  font-size: var(--text-heading-sm);
  font-weight: var(--font-weight-regular);
  letter-spacing: var(--tracking-heading-sm);
  color: var(--color-charcoal);
  margin-bottom: var(--spacing-8);
}

.modal__desc {
  font-size: var(--text-body-sm);
  color: var(--color-steel);
  margin-bottom: var(--spacing-24);
}

.modal__link-box {
  display: flex;
  gap: var(--spacing-8);
  margin-bottom: var(--spacing-24);
}

.modal__link-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--color-cream);
  border: 1px solid var(--color-silk);
  border-radius: 12px;
  font-family: var(--font-aspekta);
  font-size: var(--text-body-sm);
  color: var(--color-graphite);
  outline: none;
  min-width: 0;
}

.modal__link-input:focus {
  border-color: var(--color-steel);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-12);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 24px;
  background: var(--color-mid-ink);
  color: var(--color-bone);
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-pills);
  box-shadow: var(--shadow-subtle-2);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

/* Staggered delays for card animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: var(--spacing-32);
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-expertise__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .notes-sidebar {
    width: 160px;
  }

  .collab-panel {
    width: 240px;
  }
}

@media (max-width: 768px) {
  .page-container {
    padding: 0 var(--spacing-20);
  }

  .navbar__inner {
    padding: 0 var(--spacing-20);
  }

  .navbar__center {
    display: block;
    position: static;
    transform: none;
    font-size: 24px;
  }

  .hero {
    padding: 120px 0 var(--spacing-64);
  }

  .hero__title {
    font-size: var(--text-heading-lg);
    line-height: var(--leading-heading-lg);
    letter-spacing: var(--tracking-heading-lg);
  }

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

  .about-expertise__grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: var(--spacing-64) 0;
  }

  /* Mobile-drawer styling for notes-sidebar */
  .notes-sidebar {
    display: flex !important;
    position: fixed;
    left: 0;
    top: 56px;
    bottom: 0;
    z-index: 1000;
    width: 240px;
    background: var(--surface-canvas);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
    opacity: 1;
    overflow-y: auto;
  }

  /* Slide off-screen when collapsed on mobile */
  .notes-sidebar.collapsed {
    transform: translateX(-100%) !important;
    width: 240px !important;
    padding: var(--spacing-12) !important;
    opacity: 1 !important;
    overflow: visible !important;
  }

  .collab-panel {
    position: fixed;
    right: 0;
    top: 56px;
    bottom: 0;
    z-index: 300;
    width: 280px;
    box-shadow: var(--shadow-subtle-2);
  }

  .collab-panel.collapsed {
    width: 0;
  }

  .annotation-toolbar {
    left: 8px;
    padding: var(--spacing-8);
  }

  .annotation-toolbar .btn-icon {
    width: 36px;
    height: 36px;
  }

  .notes-topbar {
    padding: 0 var(--spacing-12);
    gap: var(--spacing-12);
  }

  #toggleSidebar {
    display: inline-flex !important;
  }

  .notes-topbar__actions {
    gap: var(--spacing-4);
  }

  .collab-badge {
    padding: 4px var(--spacing-8);
  }

  .footer__inner {
    flex-direction: column;
    gap: var(--spacing-16);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: var(--text-heading);
    line-height: var(--leading-heading);
    letter-spacing: var(--tracking-heading);
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .zoom-controls {
    bottom: 16px;
  }

  .share-btn-text {
    display: none;
  }

  #shareBtn {
    padding: 8px !important;
  }
}

/* ============================================================
   LOADING STATE
   ============================================================ */
.pdf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: var(--spacing-16);
  color: var(--color-steel);
}

.pdf-loading__spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--color-silk);
  border-top-color: var(--color-mid-ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.pdf-loading__text {
  font-size: var(--text-body-sm);
  color: var(--color-steel);
}

.pdf-page-placeholder {
  background: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-aspekta);
}

.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-8);
}

.placeholder-text {
  color: var(--color-steel);
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.14px;
}

.placeholder-loader {
  width: 100px;
  height: 3px;
  background: var(--color-silk);
  border-radius: var(--radius-pills);
  overflow: hidden;
  position: relative;
}

.placeholder-loader__bar {
  width: 40px;
  height: 100%;
  background: var(--color-mid-ink);
  border-radius: var(--radius-pills);
  position: absolute;
  top: 0;
  left: 0;
  animation: loadingBar 1.5s infinite ease-in-out;
}

@keyframes loadingBar {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(250%);
  }
}

html[data-theme="dark"] .pdf-page-placeholder {
  background: #181818;
}

html[data-theme="dark"] .placeholder-loader {
  background: #2a2a2a;
}

html[data-theme="dark"] .placeholder-loader__bar {
  background: #f0f0f0;
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
.pdf-viewer::-webkit-scrollbar,
.notes-sidebar::-webkit-scrollbar,
.collab-panel__body::-webkit-scrollbar {
  width: 6px;
}

.pdf-viewer::-webkit-scrollbar-track,
.notes-sidebar::-webkit-scrollbar-track,
.collab-panel__body::-webkit-scrollbar-track {
  background: transparent;
}

.pdf-viewer::-webkit-scrollbar-thumb,
.notes-sidebar::-webkit-scrollbar-thumb,
.collab-panel__body::-webkit-scrollbar-thumb {
  background: var(--color-ash);
  border-radius: 3px;
}

.pdf-viewer::-webkit-scrollbar-thumb:hover,
.notes-sidebar::-webkit-scrollbar-thumb:hover,
.collab-panel__body::-webkit-scrollbar-thumb:hover {
  background: var(--color-steel);
}

/* ============================================================
   DRAWING & TWO-PAGE LAYOUT ADDITIONS
   ============================================================ */

.color-swatch--red {
  background: rgba(244, 67, 54, 0.8);
}

.pdf-page-wrapper canvas.drawing-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.pdf-page-wrapper canvas.laser-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
}

/* Two-page view side-by-side layout styling */
.pdf-viewer.two-page-view {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: center;
  align-items: start;
  gap: var(--spacing-16);
  overflow-x: auto;
}

.pdf-viewer.two-page-view .pdf-page-wrapper {
  margin-bottom: var(--spacing-8);
}

/* ============================================================
   CONTENT PROTECTION — Screenshot, Print, Copy Deterrent
   ============================================================ */

/* Disable text selection on the notes page */
.notes-page {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Allow selection inside inputs and textareas */
.notes-page input,
.notes-page textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* ---- Content is HIDDEN by default (protected state) ---- */
/* Hide only the main UI content elements by default */
.notes-page .notes-topbar,
.notes-page .notes-main,
.notes-page .annotation-toolbar,
.notes-page .zoom-controls {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Only show content when JS explicitly adds 'content-revealed' to body */
.notes-page.content-revealed .notes-topbar,
.notes-page.content-revealed .notes-main,
.notes-page.content-revealed .annotation-toolbar,
.notes-page.content-revealed .zoom-controls {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Protection overlay — VISIBLE and OPAQUE by default */
.protection-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
}

/* Only hide overlay when content is revealed */
.notes-page.content-revealed .protection-overlay {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Dark mode overlay background */
[data-theme="dark"] .protection-overlay {
  background: #121212;
}

.protection-overlay__content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-16);
}

.protection-overlay__content svg {
  color: var(--color-steel);
}

.protection-overlay__title {
  font-family: var(--font-aspekta);
  font-size: var(--text-heading);
  font-weight: var(--font-weight-regular);
  color: var(--color-charcoal);
  letter-spacing: var(--tracking-heading);
}

.protection-overlay__desc {
  font-family: var(--font-aspekta);
  font-size: var(--text-body);
  color: var(--color-steel);
  letter-spacing: var(--tracking-body);
}

.protection-overlay__btn {
  margin-top: var(--spacing-8);
  font-size: var(--text-body-sm);
  padding: 10px 20px;
}

/* Block printing completely */
@media print {
  .notes-page {
    display: none !important;
  }
  body::after {
    content: 'Printing this document is not permitted.';
    display: block;
    padding: 40px;
    font-family: var(--font-aspekta), system-ui, sans-serif;
    font-size: 18px;
    color: #696969;
    text-align: center;
  }
}

/* ============================================================
   PRICING PAGE
   ============================================================ */
.pricing-hero {
  padding: 140px 0 var(--spacing-64);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pricing-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-32);
  max-width: 1120px;
  margin: 0 auto var(--spacing-64);
}

.pricing-card {
  padding: var(--spacing-40) var(--spacing-32);
  display: flex;
  flex-direction: column;
  position: relative;
  height: auto;
  flex: 1 1 320px;
  max-width: 360px;
}

.pricing-toggle-container {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-48);
}

.pricing-toggle {
  display: inline-flex;
  background: var(--surface-card);
  padding: 4px;
  border: 1px solid var(--color-silk);
  border-radius: 30px;
  box-shadow: var(--shadow-subtle);
  position: relative;
}

.pricing-toggle__btn {
  border: none;
  background: transparent;
  padding: 10px 28px;
  font-family: var(--font-aspekta);
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--color-steel);
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.pricing-toggle__btn:hover {
  color: var(--color-charcoal);
}

.pricing-toggle__btn.active {
  background: var(--color-charcoal);
  color: var(--color-bone);
}

.pricing-card.hidden {
  display: none !important;
}

.pricing-card--featured {
  border-width: 2px !important;
  border-color: var(--color-charcoal) !important;
  transform: translateY(-8px);
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  right: var(--spacing-32);
  background: var(--color-charcoal);
  color: var(--color-bone);
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  padding: 4px 12px;
  border-radius: var(--radius-pills);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pricing-card__accent {
  font-family: var(--font-fasthand);
  font-size: var(--text-heading-sm);
  color: var(--color-steel);
  margin-bottom: var(--spacing-8);
}

.pricing-card__title {
  font-size: var(--text-heading);
  font-weight: var(--font-weight-medium);
  color: var(--color-charcoal);
  margin-bottom: var(--spacing-16);
  letter-spacing: var(--tracking-heading);
}

.pricing-card__price {
  font-size: 48px;
  font-weight: var(--font-weight-medium);
  color: var(--color-charcoal);
  margin-bottom: var(--spacing-16);
  display: flex;
  align-items: baseline;
}

.pricing-card__price .currency {
  font-size: var(--text-heading-sm);
  align-self: flex-start;
  margin-top: 8px;
  margin-right: 4px;
}

.pricing-card__price .period {
  font-size: var(--text-body);
  color: var(--color-steel);
  margin-left: var(--spacing-8);
}

.pricing-card__desc {
  font-size: var(--text-body);
  color: var(--color-steel);
  line-height: 1.5;
  margin-bottom: var(--spacing-24);
  flex-grow: 1;
}

.pricing-card__divider {
  border: 0;
  border-top: 1px solid var(--color-silk);
  margin-bottom: var(--spacing-24);
}

.pricing-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-32) 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-12);
}

.pricing-card__features li {
  font-size: var(--text-body-sm);
  color: var(--color-graphite);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-12);
  line-height: 1.4;
}

.pricing-card__features li svg {
  width: 16px;
  height: 16px;
  color: #22c55e;
  flex-shrink: 0;
  margin-top: 2px;
}

.pricing-card__btn {
  text-align: center;
  width: 100%;
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-24);
    max-width: 480px;
    padding: 0 var(--spacing-16);
  }
  
  .pricing-card--featured {
    transform: none;
  }
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --color-charcoal: #f0f0f0;
  --color-graphite: #e8e8e8;
  --color-mid-ink: #d4d4d4;
  --color-steel: #a0a0a0;
  --color-fog: #888888;
  --color-ash: #666666;
  --color-slate: #777777;
  --color-mist: #444444;
  --color-silk: #2a2a2a;
  --color-bone: #121212;
  --color-cream: #1a1a1a;
  --surface-canvas: #121212;
}

[data-theme="dark"] body {
  background: #121212;
}

[data-theme="dark"] .navbar {
  background: rgba(18, 18, 18, 0.9);
  border-bottom-color: #2a2a2a;
}

[data-theme="dark"] .navbar__links.open {
  background: #1a1a1a !important;
  border-bottom-color: #2a2a2a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .floating-card {
  background: #1e1e1e;
  border-color: #2a2a2a;
}

[data-theme="dark"] .btn-pill-dark {
  background: #f0f0f0;
  color: #121212;
}

[data-theme="dark"] .btn-pill-dark:hover {
  background: #d4d4d4;
}

[data-theme="dark"] .btn-pill-light {
  border-color: #444444;
  color: #e0e0e0;
}

[data-theme="dark"] .btn-pill-light:hover {
  background: #2a2a2a;
}

[data-theme="dark"] .footer {
  border-top-color: #2a2a2a;
}

[data-theme="dark"] .divider {
  border-color: #2a2a2a;
}

[data-theme="dark"] .hero__grid-bg,
[data-theme="dark"] .about-hero__grid-bg {
  opacity: 0.15;
}

[data-theme="dark"] .about-bio__image-wrapper {
  background: #1e1e1e;
}

[data-theme="dark"] .about-bio__credential svg {
  stroke: #a0a0a0;
}

[data-theme="dark"] .navbar__hamburger span {
  background: #e0e0e0;
}

/* Dark mode toggle button */
.theme-toggle {
  background: none;
  border: 1px solid var(--color-silk);
  border-radius: var(--radius-pills);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  transition: background 0.2s ease, border-color 0.2s ease;
  color: var(--color-charcoal);
}

.theme-toggle:hover {
  background: var(--color-cream);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* --- Additional Dark Mode styles --- */
html[data-theme="dark"] {
  --color-charcoal: #f0f0f0;
  --color-graphite: #e8e8e8;
  --color-mid-ink: #d4d4d4;
  --color-steel: #a0a0a0;
  --color-fog: #888888;
  --color-ash: #666666;
  --color-slate: #777777;
  --color-mist: #444444;
  --color-silk: #2a2a2a;
  --color-bone: #121212;
  --color-cream: #1a1a1a;
  --surface-canvas: #121212;
  --surface-card: #1e1e1e;
  --surface-secondary: #1a1a1a;
}

html[data-theme="dark"] body {
  background: #121212;
  color: #e8e8e8;
}

html[data-theme="dark"] .navbar {
  background: rgba(18, 18, 18, 0.95) !important;
  border-bottom-color: #2a2a2a !important;
}

html[data-theme="dark"] .navbar__links.open {
  background: #121212 !important;
  border-bottom-color: #2a2a2a !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .notes-topbar {
  background: #121212 !important;
  border-bottom-color: #2a2a2a !important;
}

html[data-theme="dark"] .notes-sidebar {
  background: #121212 !important;
  border-right-color: #2a2a2a !important;
}

html[data-theme="dark"] .notes-sidebar__thumb-num {
  background: rgba(18, 18, 18, 0.85) !important;
  color: #f0f0f0 !important;
}

html[data-theme="dark"] .pdf-viewer {
  background: #1e1e1e !important;
}

html[data-theme="dark"] .pdf-page-wrapper {
  background: #121212 !important;
  border-color: #2a2a2a !important;
}

html[data-theme="dark"] .collab-panel {
  background: #121212 !important;
  border-left-color: #2a2a2a !important;
}

html[data-theme="dark"] .collab-panel__header {
  border-bottom-color: #2a2a2a !important;
}

html[data-theme="dark"] .collab-panel__powered {
  border-top-color: #2a2a2a !important;
}

html[data-theme="dark"] .collab-panel__powered img,
html[data-theme="dark"] .modal__powered img {
  filter: invert(1);
}

html[data-theme="dark"] .share-box__input {
  background: #1e1e1e !important;
  border-color: #2a2a2a !important;
  color: #f0f0f0 !important;
}

html[data-theme="dark"] .annotation-toolbar {
  background: rgba(18, 18, 18, 0.95) !important;
  border-color: #2a2a2a !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .toolbar-divider {
  background: #2a2a2a !important;
}

html[data-theme="dark"] .btn-pill-dark {
  background: #f0f0f0 !important;
  color: #121212 !important;
}

html[data-theme="dark"] .btn-pill-dark:hover {
  background: #d4d4d4 !important;
}

html[data-theme="dark"] .btn-pill-light {
  border-color: #444444 !important;
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .btn-pill-light:hover {
  background: #2a2a2a !important;
}

/* ============================================================
   SIDEBAR TABS & INDEX (TABLE OF CONTENTS)
   ============================================================ */

/* Sidebar Tabs Container */
.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-silk);
  background: var(--surface-canvas);
  position: sticky;
  top: 0;
  z-index: 10;
  margin: -12px -12px var(--spacing-12) -12px;
}

/* Tab Buttons */
.sidebar-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: var(--spacing-12) var(--spacing-8);
  font-family: var(--font-aspekta);
  font-size: var(--text-body-sm);
  color: var(--color-steel);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  font-weight: var(--font-weight-medium);
}

.sidebar-tab:hover {
  color: var(--color-charcoal);
  background: var(--color-cream);
}

.sidebar-tab.active {
  color: var(--color-charcoal);
  border-bottom-color: var(--color-mid-ink);
  font-weight: var(--font-weight-medium);
}

html[data-theme="dark"] .sidebar-tab.active {
  border-bottom-color: #f0f0f0;
  color: #ffffff;
}

html[data-theme="dark"] .sidebar-tab:hover {
  color: #ffffff;
  background: #1c1c1c;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.sidebar-pane {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
}

.sidebar-pane.hidden {
  display: none !important;
}

/* Index Loading/Empty states */
.index-loading,
.index-empty {
  text-align: center;
  font-size: var(--text-body-sm);
  color: var(--color-steel);
  padding: var(--spacing-24) 0;
  font-family: var(--font-aspekta);
}

/* Index List items */
.index-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4);
  overflow-y: auto;
  flex-grow: 1;
  max-height: 85vh;
}

.index-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-8) var(--spacing-12);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-aspekta);
  font-size: var(--text-body-sm);
  color: var(--color-graphite);
  border: 1px solid transparent;
  text-decoration: none;
}

.index-item:hover {
  background: var(--color-cream);
  border-color: var(--color-silk);
}

.index-item.active {
  background: var(--color-cream);
  color: var(--color-charcoal);
  font-weight: var(--font-weight-medium);
  border-color: var(--color-silk);
}

html[data-theme="dark"] .index-item {
  color: #e0e0e0;
}

html[data-theme="dark"] .index-item:hover,
html[data-theme="dark"] .index-item.active {
  background: #1c1c1c;
  border-color: #2a2a2a;
  color: #ffffff;
}

.index-item__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: var(--spacing-8);
  text-align: left;
}

.index-item__page {
  font-size: var(--text-caption);
  color: var(--color-steel);
  flex-shrink: 0;
  background: var(--color-silk);
  padding: 2px 6px;
  border-radius: 4px;
}

html[data-theme="dark"] .index-item__page {
  background: #2a2a2a;
  color: #b2b2b2;
}

/* Outline nesting levels */
.index-item--level-0 {
  font-weight: 500;
}

.index-item--level-1 {
  padding-left: 20px;
}

.index-item--level-2 {
  padding-left: 32px;
  font-size: 13px;
  opacity: 0.85;
}

.index-item--level-3 {
  padding-left: 44px;
  font-size: 12px;
  opacity: 0.75;
}

/* ============================================================
   POLICY PAGES STYLING
   ============================================================ */
.policy-page {
  padding: var(--spacing-64) 0 var(--spacing-100);
}

.policy-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-32);
}

.policy-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-12);
}

.policy-section h2 {
  font-family: var(--font-aspekta);
  font-size: var(--text-subheading);
  font-weight: 600;
  color: var(--color-charcoal);
  letter-spacing: var(--tracking-subheading);
}

html[data-theme="dark"] .policy-section h2 {
  color: #ffffff;
}

.policy-section p, .policy-section ul, .policy-section ol {
  font-family: var(--font-aspekta);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  color: var(--color-steel);
}

html[data-theme="dark"] .policy-section p, 
html[data-theme="dark"] .policy-section ul, 
html[data-theme="dark"] .policy-section ol {
  color: var(--color-ash);
}

.policy-section ul, .policy-section ol {
  padding-left: var(--spacing-24);
}

.policy-section li {
  margin-bottom: var(--spacing-8);
}

.policy-section a {
  color: var(--color-charcoal);
  text-decoration: underline;
}

html[data-theme="dark"] .policy-section a {
  color: #ffffff;
}
