/* Namapura Article Design v1.1.0 */

:root {
  --np-ink: #263a32;
  --np-heading: #194f43;
  --np-muted: #60736a;
  --np-line: #cfe0d4;
  --np-green-deep: #194f43;
  --np-green: #2f7d63;
  --np-green-soft: #eaf5e8;
  --np-lime: #b7d95c;
  --np-lime-soft: #f2f8df;
  --np-aqua: #58b8c8;
  --np-aqua-dark: #176b78;
  --np-aqua-soft: #e8f7fa;
  --np-orange: #ed9238;
  --np-orange-dark: #8b4b04;
  --np-orange-soft: #fff2e2;
  --np-student: #4f7428;
  --np-student-bg: #f2f8df;
  --np-student-line: #cfe494;
  --np-teacher: #176b78;
  --np-teacher-bg: #e8f7fa;
  --np-teacher-line: #b8e0e7;
  --np-shadow: 0 8px 22px rgba(32, 86, 69, 0.07);
}

/* Cocoon site-wide palette */
body {
  background: #f5faf3;
  color: var(--np-ink);
}

#header-container,
.header-container {
  background: linear-gradient(120deg, var(--np-lime-soft) 0%, var(--np-aqua-soft) 100%);
  border-top: 6px solid var(--np-green);
}

#header-container a,
.header-container a,
.site-name-text,
.site-name-text a {
  color: var(--np-green-deep);
}

.tagline {
  color: #567468;
}

#navi,
.navi {
  background: var(--np-green);
}

#navi .navi-in a,
.navi .navi-in a {
  color: #fff;
}

#navi .navi-in a:hover,
.navi .navi-in a:hover {
  background: var(--np-orange);
  color: #fff;
}

#main,
.main,
.sidebar .widget {
  background: #fff;
  border: 1px solid #dce9df;
  border-radius: 16px;
  box-shadow: 0 9px 26px rgba(35, 91, 70, 0.06);
}

.sidebar .widget {
  padding: 1.1rem;
}

.sidebar h2,
.sidebar h3,
.widget-title {
  border-bottom: 2px solid var(--np-lime);
  color: var(--np-green-deep);
  padding-bottom: 0.45em;
}

.entry-title,
.article-title {
  color: var(--np-green-deep);
}

.content a {
  color: #16766d;
}

.content a:hover {
  color: #d87420;
}

.cat-label,
.cat-link,
.entry-category a {
  background: var(--np-green);
  color: #fff;
}

.pagination-next-link,
.page-numbers.current,
.pager-post-navi a:hover {
  background: var(--np-green);
  color: #fff;
}

#footer,
.footer {
  background: var(--np-green-deep);
  color: #eef8f1;
}

#footer a,
.footer a {
  color: #fff;
}

/* Article typography */
.np-article {
  color: var(--np-ink);
  font-size: 17px;
  letter-spacing: 0.015em;
  line-height: 1.9;
}

.np-article p {
  margin: 0 0 1.25em;
}

.np-article h2 {
  border-bottom: 3px solid var(--np-lime);
  color: var(--np-heading);
  font-size: clamp(1.3rem, 2.3vw, 1.65rem);
  line-height: 1.45;
  margin: 2.6em 0 1em;
  padding: 0 0 0.45em;
}

.np-lead {
  color: var(--np-heading);
  font-size: 1.08em;
  font-weight: 600;
  line-height: 1.95;
}

/* Dialogue: student = lime, teacher = aqua */
.np-dialogue-set {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2.1rem 0 2.4rem;
}

.np-dialogue {
  align-items: start;
  display: grid;
  gap: 0.9rem;
  width: 100%;
}

.np-dialogue--teacher {
  grid-template-columns: 74px minmax(0, 1fr);
  padding-right: 4%;
}

.np-dialogue--student {
  grid-template-columns: minmax(0, 1fr) 74px;
  padding-left: 4%;
}

.np-dialogue__speaker {
  background-color: #fff;
  background-position: center 8%;
  background-repeat: no-repeat;
  background-size: 115%;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #c9d9cf, 0 5px 14px rgba(30, 76, 58, 0.10);
  height: 70px;
  overflow: hidden;
  text-indent: -9999px;
  width: 70px;
}

.np-dialogue--teacher .np-dialogue__speaker {
  background-image: url('teacher-avatar-v1.png');
  grid-column: 1;
  grid-row: 1;
}

.np-dialogue--student .np-dialogue__speaker {
  background-image: url('student-avatar-v1.png');
  grid-column: 2;
  grid-row: 1;
}

.np-dialogue__bubble {
  border: 1px solid;
  border-radius: 20px;
  box-shadow: var(--np-shadow);
  min-width: 0;
  padding: 1rem 1.3rem 1.05rem;
  position: relative;
}

.np-dialogue--teacher .np-dialogue__bubble {
  background: var(--np-teacher-bg);
  border-color: var(--np-teacher-line);
  grid-column: 2;
  grid-row: 1;
}

.np-dialogue--student .np-dialogue__bubble {
  background: var(--np-student-bg);
  border-color: var(--np-student-line);
  grid-column: 1;
  grid-row: 1;
}

.np-dialogue__bubble::before,
.np-dialogue__bubble::after {
  border: solid transparent;
  content: '';
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
}

.np-dialogue--teacher .np-dialogue__bubble::before {
  border-right-color: var(--np-teacher-line);
  border-width: 9px 12px 9px 0;
  left: -12px;
}

.np-dialogue--teacher .np-dialogue__bubble::after {
  border-right-color: var(--np-teacher-bg);
  border-width: 8px 11px 8px 0;
  left: -10px;
  top: 23px;
}

.np-dialogue--student .np-dialogue__bubble::before {
  border-left-color: var(--np-student-line);
  border-width: 9px 0 9px 12px;
  right: -12px;
}

.np-dialogue--student .np-dialogue__bubble::after {
  border-left-color: var(--np-student-bg);
  border-width: 8px 0 8px 11px;
  right: -10px;
  top: 23px;
}

.np-dialogue__name {
  display: block;
  font-size: 0.92em;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.45em;
}

.np-dialogue--teacher .np-dialogue__name {
  color: var(--np-teacher);
}

.np-dialogue--student .np-dialogue__name {
  color: var(--np-student);
}

.np-dialogue__bubble p,
.np-dialogue__bubble p:last-child {
  margin: 0;
}

/* Highlighted terms */
.np-term {
  border-radius: 0.22em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-weight: 750;
  padding: 0.03em 0.2em;
  text-decoration-line: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

.np-term--cell {
  background: var(--np-green-soft);
  color: #1c705c;
  text-decoration-color: #70b89c;
}

.np-term--dna {
  background: var(--np-aqua-soft);
  color: var(--np-aqua-dark);
  text-decoration-color: #77c5d0;
}

.np-term--energy {
  background: var(--np-orange-soft);
  color: var(--np-orange-dark);
  text-decoration-color: #e2ae67;
}

/* Learning boxes */
.np-checklist,
.np-keypoint,
.np-caution,
.np-plus,
.np-summary {
  border: 1px solid var(--np-line);
  border-radius: 14px;
  box-shadow: var(--np-shadow);
  margin: 1.7em 0;
  padding: 1.2em 1.3em 1.05em;
}

.np-checklist {
  background: #fbfef9;
  border-left: 5px solid var(--np-lime);
}

.np-keypoint {
  background: var(--np-green-soft);
  border-left: 5px solid var(--np-green);
}

.np-caution {
  background: var(--np-orange-soft);
  border-left: 5px solid var(--np-orange);
}

.np-plus {
  background: var(--np-aqua-soft);
  border-left: 5px solid var(--np-aqua);
}

.np-summary {
  background: #eef7ed;
  border-left: 5px solid var(--np-green);
}

.np-box-title {
  color: var(--np-heading);
  display: block;
  font-size: 0.95em;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.65em;
}

.np-checklist ul,
.np-summary ul {
  margin: 0;
  padding-left: 1.35em;
}

.np-checklist li,
.np-summary li {
  margin: 0.25em 0;
}

.np-checklist p:last-child,
.np-keypoint p:last-child,
.np-caution p:last-child,
.np-plus p:last-child,
.np-summary p:last-child {
  margin-bottom: 0;
}

/* Figures and questions */
.np-figure {
  background: #fbfefc;
  border: 1px solid #dce9df;
  border-radius: 16px;
  margin: 2em 0;
  padding: clamp(0.7rem, 2vw, 1.15rem);
  text-align: center;
}

.np-figure img {
  border-radius: 10px;
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
}

.np-figure figcaption {
  color: var(--np-muted);
  font-size: 0.88em;
  margin-top: 0.75em;
}

.np-question {
  background: #fff;
  border: 1px solid #cfe0d4;
  border-radius: 12px;
  margin: 0.85em 0;
  overflow: hidden;
}

.np-question summary {
  color: var(--np-heading);
  cursor: pointer;
  font-weight: 700;
  padding: 0.95em 1.1em;
}

.np-question[open] summary {
  background: var(--np-aqua-soft);
  border-bottom: 1px solid #cfe0d4;
}

.np-answer {
  padding: 1em 1.15em 1.1em;
}

@media (max-width: 640px) {
  #main,
  .main,
  .sidebar .widget {
    border-radius: 12px;
  }

  .np-article {
    font-size: 16px;
    line-height: 1.85;
  }

  .np-dialogue-set {
    gap: 1.15rem;
  }

  .np-dialogue--teacher {
    grid-template-columns: 54px minmax(0, 1fr);
    padding-right: 0;
  }

  .np-dialogue--student {
    grid-template-columns: minmax(0, 1fr) 54px;
    padding-left: 0;
  }

  .np-dialogue__speaker {
    border-width: 2px;
    height: 50px;
    width: 50px;
  }

  .np-dialogue__bubble {
    border-radius: 16px;
    padding: 0.85rem 0.95rem 0.9rem;
  }

  .np-dialogue__bubble::before,
  .np-dialogue__bubble::after {
    top: 16px;
  }

  .np-dialogue--teacher .np-dialogue__bubble::after,
  .np-dialogue--student .np-dialogue__bubble::after {
    top: 17px;
  }

  .np-checklist,
  .np-keypoint,
  .np-caution,
  .np-plus,
  .np-summary {
    border-radius: 11px;
    padding: 1em 1em 0.9em;
  }
}

