 :root {
      --deep-green: #1B4332;
      --deep-gray: #2F3E46;
      --squash: #F4A261;
      --paper: #fffefb;
      --ink: #1f1f1f;
      --muted: #5f5a54;
      --border: rgba(27, 67, 50, 0.1);
    }
    * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
    body {
      margin: 0;
      font-family: 'Inter', sans-serif;
      background: #f4f7f5;
      color: var(--ink);
      display: flex;
      flex-direction: column;
      min-height: auto;
    }
    header { 
      background: var(--deep-green); 
      color: white; 
      padding: 0.9rem 1rem 0rem 1rem;
      display: flex; 
      flex-direction: column;
      align-items: center;
      text-align: center;
      position: relative;
      width: 100%;
    }
    .logo { 
      width: 75px; height: 75px;
      background: var(--squash); 
      border-radius: 16px; display: grid; place-items: center; 
      color: var(--deep-green); margin-bottom: 0.5rem;
      box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    }
    .brand-text b { 
    display: block; 
    font-family: 'Comfortaa', serif; 
    font-size: 4.1rem;               
    letter-spacing: 0.4px;             
    line-height: 1.1; 
    margin-bottom: 0.2rem;
    font-weight: 900;                
    text-transform: lowercase;      
    }
    .brand-text span { 
      display: block;
      font-family: 'Dancing Script', cursive; 
      font-size: 1.5rem;
      color: var(--squash); 
      text-transform: none;
      letter-spacing: 1px; 
      margin-top: -5px; 
      font-weight: 600;
    }
    .nav-action {
      position: absolute;
      top: 25px;
      right: 25px;
      background: rgba(255,255,255,0.15);
      border: 1px solid rgba(255,255,255,0.3);
      color: white;
      padding: 12px 24px;
      border-radius: 8px;
      font-size: 0.9rem;
      font-weight: 700;
      text-transform: uppercase;
      cursor: pointer;
      display: none;
    }
    .hero {
      background: white;
      text-align: center;
      padding: 1.5rem 1.5rem;
    }
    .hero h2 { color: var(--deep-green); font-size: 1.8rem; margin: 0 0 0rem 0; font-weight: 800; }
    .hero p { color: var(--muted); line-height: 1.5; max-width: 600px; margin: 0.5rem auto 1rem auto; font-size: 0.95rem; }
    .pillars {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      max-width: 600px;
      margin: 0 auto;
    }
    .btn-pillar {
      padding: 10px 0;
      border-radius: 8px;
      border: none;
      font-weight: 800;
      font-size: 1.4rem; 
      cursor: pointer;
      transition: 0.2s;
      text-transform: uppercase;
      letter-spacing: 1.5px;
    }
    .btn-read { background: var(--deep-green); color: var(--squash); }
    .btn-write { background: var(--squash); color: var(--deep-green); }
    .btn-check { background: var(--deep-gray); color: white; }
    .btn-pillar:hover { transform: translateY(-4px); filter: brightness(1.1); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    .how {
      padding: 0.5rem 1.5rem 1.5rem 1.5rem;
      text-align: center;
      max-width:800px;
      margin: 0 auto;
}
.has-tooltip {
  position: relative;
}

.has-tooltip::after {
  content: attr(data-note);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--deep-gray);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  text-transform: none;
  width: 200px;
  line-height: 1.2;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.has-tooltip::before {
  content: '';
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--deep-gray);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
  z-index: 100;
}

.has-tooltip:hover::after,
.has-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
    .how h3 { color: var(--deep-green); font-size: 1.5rem; margin: 0 0 0.2rem 0; font-weight: 800; }
    .how-sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.0rem; display: block; }
    .steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
    .step { display: flex; flex-direction: column; align-items: center; }
    .step-num { width: 32px; height: 32px; background: var(--deep-green); color: var(--squash); border-radius: 50%; display: grid; place-items: center; font-weight: 900; margin-bottom: 5px; font-size: 1rem; }
    .step b { color: var(--deep-green); font-size: 1rem; margin-bottom: 5px; display: block; }
    .step p { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
    .essay-card { background: white; border: 1px solid var(--border); padding: 20px; border-radius: 12px; transition: 0.2s; }
    .essay-card:hover { border-color: var(--squash); box-shadow: 0 4px 12px rgba(0,0,0,0.05); transform: translateY(-2px); }
    .btn-read-more { background: transparent; color: var(--deep-green); border: 1px solid var(--deep-green); padding: 8px 16px; border-radius: 6px; font-weight: 700; font-size: 0.8rem; cursor: pointer; transition: 0.2s; }
    .btn-read-more:hover { background: var(--deep-green); color: white; }
    @media (max-width: 768px) {
      .brand-text b { font-size: 2.2rem; }
      .brand-text span { font-size: 0.8rem; }
      .logo { width: 60px; height: 60px; }
      .pillars { grid-template-columns: 1fr; }
      .steps-grid { grid-template-columns: 1fr; }
      .hero h2 { font-size: 1.6rem; }
    }
    .page { display: none; min-height: auto; padding: 30px; overflow-y: auto; }
    .page.active { display: block; }
    .auth-container { max-width: 400px; margin: 0.5rem auto; padding: 1.0rem; background: white; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); text-align: center; position: relative; }
    .auth-container input { width: 100%; padding: 12px; margin: 8px 0; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; }
    .btn-auth { width: 100%; padding: 12px; background: var(--deep-green); color: white; border: none; border-radius: 6px; font-weight: 700; cursor: pointer; margin-top: 10px; font-size: 1rem; }
    .btn-auth:hover { background: #14382a; }
    .dash-container { max-width: 800px; margin: -1rem auto; padding: 5px; }
    .user-info { display: flex; justify-content: space-between; align-items: center; background: white; padding: 15px 25px; border-radius: 12px; margin-bottom: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
    .stats-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
    .side-panel { background: white; padding: 20px; border-radius: 12px; height: fit-content; }
    .main-panel { background: white; padding: 20px; border-radius: 12px; }
    .editor-toolbar { background: #e9ecef; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; border-radius: 8px 8px 0 0; max-width: 800px; margin: 0 auto; }
    .notebook-container { background: var(--paper); max-width: 800px; margin: 0 auto 2rem auto; padding: 60px 50px; box-shadow: 0 0 20px rgba(0,0,0,0.1); min-height: 800px; border-radius: 0 0 12px 12px; }
    .notebook-paper { background-image: linear-gradient(#e1e1e1 1px, transparent 1px); background-size: 100% 2.5rem; line-height: 2.5rem; }
   .notebook-title {
  width: 60%;                /* Makes the line shorter */
  margin: 0 auto 0.5rem auto; /* Centers it and brings it closer to the label */
  border: none;
  background: transparent;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  border-bottom: 2px solid var(--deep-green); 
  font-family: 'Ubuntu', sans-serif; /* Changed to Ubuntu */
  color: var(--deep-green);
  display: block;            /* Ensures margin auto works */
}
.original-label {
  display: block;
  text-align: center;
  font-family: 'Lato', sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2rem;       /* Space before the body text starts */
  font-weight: 600;
}
    .notebook-body { width: 100%; min-height: 600px; padding-bottom: 120px; border: none; background: transparent; font-size: 1.2rem; line-height: 2.5rem; resize: none; outline: none; white-space: pre-wrap; word-wrap: break-word; font-family: 'Palatino Linotype', 'Palatino', serif;}
    .cursive-font { font-family: 'Edu NSW ACT Cursive', cursive !important; font-size: 1rem !important; }
    .handwriting-font { font-family: 'Edu NSW ACT Foundation', cursive; font-size: 1.3rem}
    .essay-table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 0.9rem; }
    .essay-table th { text-align: left; padding: 12px; border-bottom: 2px solid var(--border); color: var(--muted); }
    .essay-table td { padding: 12px; border-bottom: 1px solid var(--border); }
    .essay-table tr:hover { background-color: #f8fbf9; }
    .essay-content p { text-indent: 0.5in; margin: 0; line-height: 1.8rem;font-family: 'Palatino Linotype', 'Palatino', serif; font-size: 1.1rem; }
    .status-pill { padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; background: #eee; }
    .reviewer-card { background: white; padding: 15px 20px; border-radius: 8px; border-left: 5px solid var(--deep-green); margin-bottom: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); cursor: pointer; transition: 0.2s; }
    .reviewer-card:hover { border-color: var(--squash); transform: translateY(-2px); }
    .review-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1200px; margin: 0 auto; } @media (max-width: 768px) { .review-split { grid-template-columns: 1fr; } }
    .original-text-view  { 
  background: #f8f9fa; 
  padding: 20px; 
  border-radius: 8px; 
  border: 2px solid var(--squash); 
  line-height: 1.5;
  min-height: 500px;
  height: auto;
  
  max-width: 100%;
  word-wrap: break-word; 
  white-space: pre-wrap; 
  overflow-x: hidden; 
}

.correction-input { 
  width: 100%; 
  max-width: 100%;
  min-height: 500px;
  height: auto;
  padding: 20px; 
  border-radius: 8px; 
  border: 2px solid var(--deep-green); 
  font-family: inherit; 
  font-size: 1rem; 
  resize: none; 
  outline: none; 
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: hidden;
}
.review-split > * {
  min-width: 0;
  max-width: 100%
}
    .teacher-notes { width: 100%; margin-top: 15px; padding: 10px; border: 1px dashed #999; border-radius: 6px; font-family: inherit; }
    #completed-list .reviewer-card { opacity: 0.75; border-left-color: #bdc3c7; }
    #completed-list .reviewer-card:hover { opacity: 1; border-left-color: var(--deep-green); }
    .error-msg { color: #c0392b; font-size: 0.85rem; margin-top: 8px; }
    .success-msg { color: var(--deep-green); font-size: 0.85rem; margin-top: 8px; }
    .notification-banner { display: none; background: white; border: 1.2px dashed #999; border-radius: 8px; padding: 10px 20px; margin-bottom: 20px; text-align: center; font-weight: 600; font-size: 1rem; font-family: 'Lato', sans-serif; color: #c0392b; letter-spacing: 1px; }
    .notification-banner span { color: #c0392b; animation: flashRed 1.8s infinite; display: inline-block; }
@keyframes flashRed { 0%, 100% { opacity: 1; } 50%       { opacity: 0.3; } }
    .spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
.spinner-dark {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(27,67,50,0.2);
  border-top-color: var(--deep-green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
.spinner-squash {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(27,67,50,0.2);
  border-top-color: var(--deep-green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.autosave-indicator {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: 'Lato', sans-serif;
  font-style: italic;
  transition: 0.3s;
}
.paste-toast { position:fixed; bottom:30px; left:50%; transform:translateX(-50%); background:var(--deep-gray); color:white; padding:10px 20px; border-radius:8px; font-size:1rem; font-family:'Lato',sans-serif; z-index:300; opacity:0; transition:opacity 0.3s; pointer-events:none; }
.paste-toast.show { opacity:1; }
.draft-banner { display:none; background:#fffbe6; border:1px solid #f0d080; border-radius:8px; padding:10px 16px; margin-bottom:12px; font-size:0.85rem; font-family:'Lato',sans-serif; color:#856404; display:flex; justify-content:space-between; align-items:center; }
.draft-banner span { flex:1; }
.draft-banner-btns { display:flex; gap:8px; }
.draft-banner-btns button { padding:5px 12px; border-radius:6px; font-size:0.8rem; font-weight:700; cursor:pointer; border:none; }
.btn-restore { background:var(--deep-green); color:white; }
.btn-discard { background:#eee; color:#666; 
}
.correction-input p {
  text-indent: 0.5in;
  margin: 0;
  line-height: 1.8;
  font-family: 'Palatino Linotype', 'Palatino', serif;
  font-size: 1rem;
}
.original-text-input p {
  text-indent: 0in;
  margin: 0;
  line-height: 1.8;
  font-family: 'Lato', 'Lato', serif;
  font-size: 1rem;
}
@media print {
  body * {
    visibility: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .notebook-container, 
  .notebook-container *,
  #essay-title,
  #essay-body {
    visibility: visible !important;
    display: block !important;
  }

  .notebook-container {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  .notebook-title {
    border: none !important;
    border-bottom: 2px solid #000 !important;
    font-size: 24pt !important;
    text-align: center !important;
    margin-bottom: 30px !important;
    width: 100% !important;
  }

  .notebook-body {
    border: none !important;
    font-size: 12pt !important;
    line-height: 2 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
  }

  .notebook-paper {
    background: none !important;
  }
  .eraser-active {
  cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewport='0 0 24 24'><text y='20' font-size='20'>🧹</text></svg>") 0 20, cell;
}
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;700&display=swap');
}

