* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #eef3ed;
  color: #1f2a24;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding: 24px;
}

.worksheet {
  max-width: 850px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border: 2px solid #c8d8c4;
  border-radius: 18px;
}

.worksheet-header {
  text-align: center;
  border-bottom: 3px solid #8fb996;
  padding-bottom: 24px;
  margin-bottom: 30px;
}

.label {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #4f7f58;
  font-weight: bold;
}

h1 {
  font-size: 2.4rem;
  margin: 10px 0;
}

.date {
  font-size: 1.1rem;
}

section {
  margin-bottom: 30px;
}

h2 {
  color: #315c3b;
  font-size: 1.4rem;
  margin-bottom: 12px;
}

p,
li {
  font-size: 1.15rem;
}

.info-box,
.media-box,
.questions,
.answer-key {
  border: 1px solid #d6e3d2;
  border-radius: 14px;
  padding: 22px;
}

.media-placeholder {
  min-height: 180px;
  border: 2px dashed #aac6a5;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #607466;
  text-align: center;
  padding: 20px;
}

ol {
  padding-left: 26px;
}

li {
  margin-bottom: 14px;
}

.answer-key {
  background: #f4f8f3;
}

@media print {
  body {
    background: white;
    padding: 0;
  }

  .worksheet {
    border: none;
    border-radius: 0;
    max-width: none;
  }

  .answer-key {
    page-break-before: always;
  }
}

.topic-selector {
  max-width: 850px;
  margin: 0 auto 20px;
  background: white;
  border: 2px solid #c8d8c4;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.topic-selector label {
  font-weight: bold;
}

.topic-selector select,
.topic-selector button {
  font-size: 1rem;
  padding: 10px 12px;
}

.topic-selector button {
  background: #315c3b;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.topic-selector button:hover {
  background: #4f7f58;
}

@media print {
  .no-print {
    display: none;
  }
}

.media-content {
  display: grid;
  gap: 16px;
}

.topic-image {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: #f4f8f3;
  border-radius: 12px;
  border: 1px solid #d6e3d2;
}

.video-link {
  display: inline-block;
  width: fit-content;
  background: #315c3b;
  color: white;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: bold;
}

.video-link:hover {
  background: #4f7f58;
}

.app-header {
  max-width: 850px;
  margin: 0 auto 20px;
  background: #315c3b;
  color: white;
  border-radius: 18px;
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.app-label {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  opacity: 0.85;
}

.app-header h1 {
  font-size: 1.8rem;
}

.print-button {
  background: white;
  color: #315c3b;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: bold;
  cursor: pointer;
}

.print-button:hover {
  background: #eef3ed;
}

@media (max-width: 700px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media print {
  .no-print {
    display: none;
  }
}

/*==================================================
    TOPIC LIBRARY
==================================================*/

.topic-library {
    max-width: 850px;
    margin: 25px auto;
}

.library-header {
    margin-bottom: 18px;
}

.library-header h2 {
    color: #315c3b;
}

.library-grid {
    display: grid;
    gap: 16px;
}

.topic-card {
    background: white;
    border: 2px solid #d7e4d3;
    border-radius: 14px;
    padding: 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    transition: .25s;
}

.topic-card:hover {
    border-color: #4f7f58;
    transform: translateY(-2px);
}

.topic-info h3 {
    margin-bottom: 6px;
    color: #315c3b;
}

.topic-info p {
    color: #666;
    font-size: .95rem;
}

.open-topic {
    background: #315c3b;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
}

.open-topic:hover {
    background: #4f7f58;
}

/*==================================================
    DASHBOARD
==================================================*/

.dashboard {
    max-width: 1000px;
    margin: 40px auto;
}

.dashboard-grid {
    display: grid;
    gap: 24px;
    margin-top: 30px;
}

.dashboard-card {
    display: block;
    background: white;
    border: 2px solid #d7e4d3;
    border-radius: 18px;
    padding: 24px;
    color: inherit;
    text-decoration: none;
    transition: .25s;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    border-color: #4f7f58;
}

.dashboard-card h3 {
    margin-bottom: 12px;
    color: #315c3b;
}

.coming-soon {
    opacity: .65;
}

.coming-soon:hover {
    transform: none;
}

.version {
  opacity: 0.75;
  margin-top: 6px;
  font-size: 0.9rem;
}

/* Dashboard */

.dashboard {
  max-width: 1000px;
  margin: 40px auto;
}

.dashboard h2 {
  font-size: 2rem;
  color: #315c3b;
}

.dashboard > p {
  margin-top: 8px;
  color: #4f5f54;
}

.dashboard-grid {
  display: grid;
  gap: 24px;
  margin-top: 30px;
}

.dashboard-card {
  display: block;
  background: white;
  border: 2px solid #d7e4d3;
  border-radius: 18px;
  padding: 24px;
  color: inherit;
  text-decoration: none;
  transition: 0.25s;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  border-color: #4f7f58;
}

.dashboard-card h3 {
  margin-bottom: 12px;
  color: #315c3b;
}

.dashboard-card p {
  color: #4f5f54;
}

.coming-soon {
  opacity: 0.65;
}

.coming-soon:hover {
  transform: none;
}

/*==================================================
    EDITOR
==================================================*/

.editor {

    max-width: 900px;

    margin: 40px auto;

}

.editor-card {

    margin-top: 25px;

    background: white;

    border: 2px solid #d7e4d3;

    border-radius: 18px;

    padding: 30px;

    display: flex;

    flex-direction: column;

    gap: 18px;

}

.editor label {

    font-weight: bold;

    color: #315c3b;

}

.editor input,
.editor select {

    padding: 14px;

    border: 2px solid #d7e4d3;

    border-radius: 10px;

    font-size: 1rem;

}

.editor input:focus,
.editor select:focus {

    outline: none;

    border-color: #4f7f58;

}

.reading-paragraph {
    width: 100%;
    min-height: 120px;
    resize: vertical;

    padding: 14px;

    border: 2px solid #d7e4d3;
    border-radius: 10px;

    font-family: inherit;
    font-size: 1rem;
}

.secondary-button {

    width: fit-content;

    margin-top: 20px;

    background: white;

    color: #315c3b;

    border: 2px solid #315c3b;

    padding: 12px 18px;

    border-radius: 999px;

    cursor: pointer;

    font-weight: bold;

    transition: .2s;

}

.secondary-button:hover {

    background: #315c3b;

    color: white;

}

.paragraph-wrapper {

    display: flex;

    flex-direction: column;

    gap: 10px;

    margin-bottom: 20px;

}

.remove-button {

    align-self: flex-end;

    background: #ffffff;

    color: #b33939;

    border: 2px solid #b33939;

    border-radius: 999px;

    padding: 8px 16px;

    cursor: pointer;

    transition: .2s;

}

.remove-button:hover {

    background: #b33939;

    color: white;

}

/*==================================================
    QUESTION CARDS
==================================================*/

.question-card {

    background: #f7faf7;

    border: 2px solid #d7e4d3;

    border-radius: 16px;

    padding: 22px;

    margin-bottom: 20px;

    display: flex;

    flex-direction: column;

    gap: 14px;

}

.question-card h4 {

    color: #315c3b;

    margin-bottom: 6px;

}

/*==================================================
    LIVE PREVIEW
==================================================*/

.preview-section {

    margin-top: 50px;

}

.preview-card {

    margin-top: 20px;

    background: white;

    border: 2px solid #d7e4d3;

    border-radius: 18px;

    padding: 35px;

    box-shadow: 0 12px 35px rgba(0,0,0,.08);

}

.preview-card h1 {

    color: #315c3b;

    margin: 10px 0;

}

.preview-card p {

    color: #666;

}

/*==================================================
    EDITOR LAYOUT
==================================================*/

.editor-layout {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 30px;

    max-width: 1500px;

    margin: 40px auto;

    align-items: start;

}

.editor-panel,
.preview-panel {

    display: flex;

    flex-direction: column;

    gap: 25px;

}

.preview-panel {

    position: sticky;

    top: 30px;

}

@media (max-width:1100px){

    .editor-layout{

        grid-template-columns:1fr;

    }

    .preview-panel{

        position:static;

    }

}