body {
  margin: 0;
  font-family: Manrope, system-ui, sans-serif;
  background: #f3f5f8;
  color: #162031;
}

.brand-corner {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 12px auto 4px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 36, 0.12);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(15, 23, 36, 0.08);
  text-decoration: none;
}

.brand-corner-img {
  height: 28px;
  width: auto;
  display: block;
}

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.card {
  background: #fff;
  border: none;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 36, 0.06);
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.05;
}

.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pill,
.tag {
  display: inline-flex;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border-radius: 999px;
  padding: 3px 8px;
  font-weight: 600;
  font-size: 10px;
}

.tag {
  border-color: rgba(15, 23, 36, 0.12);
  background: #f8fafc;
  color: #475569;
}

.section {
  margin-top: 18px;
}

.section h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.section h2.task-condition-title {
  margin-bottom: 20px;
}

.section h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.section img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px 0;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 36, 0.12);
}

p {
  margin: 0 0 10px;
  line-height: 1.65;
  color: #334155;
}

details {
  border: 1px solid rgba(15, 23, 36, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  margin-bottom: 8px;
}

summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f172a;
}

.cta {
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
}

.breadcrumb {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 12px;
}

.breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

body[data-theme="nordic"] {
  background: #edf7ff;
  color: #14213d;
}

body[data-theme="nordic"] .card {
  background: #ffffff;
  border-color: rgba(42, 90, 145, 0.18);
  box-shadow: 0 18px 40px rgba(84, 156, 214, 0.2);
}

body[data-theme="matrix"] {
  background: #050b08;
  color: #a8f1ca;
}

body[data-theme="matrix"] .card {
  background: rgba(8, 15, 12, 0.92);
  box-shadow: 0 18px 38px rgba(6, 40, 24, 0.36);
}

body[data-theme="matrix"] .brand-corner {
  border-color: rgba(46, 102, 71, 0.52);
  background: rgba(8, 15, 12, 0.92);
  box-shadow: 0 12px 28px rgba(6, 40, 24, 0.34);
}

body[data-theme="matrix"] .brand-corner-img {
  filter: invert(1) brightness(1.12);
}

body[data-theme="matrix"] p,
body[data-theme="matrix"] .breadcrumb,
body[data-theme="matrix"] .tag {
  color: #6fa98b;
}

body[data-theme="matrix"] .pill,
body[data-theme="matrix"] .btn {
  border-color: rgba(24, 181, 108, 0.52);
  background: rgba(9, 33, 20, 0.85);
  color: #8ae7b7;
}

body[data-theme="matrix"] .btn {
  border: 1px solid rgba(24, 181, 108, 0.52);
}

body[data-theme="matrix"] details {
  border-color: rgba(46, 102, 71, 0.52);
  background: rgba(6, 19, 13, 0.9);
}

body[data-theme="matrix"] summary {
  color: #a8f1ca;
}

body[data-theme="matrix"][data-matrix-variant="blue"] {
  background: #030916;
  color: #9dccff;
}

body[data-theme="matrix"][data-matrix-variant="blue"] .card {
  background: rgba(6, 16, 34, 0.92);
  box-shadow: 0 18px 38px rgba(9, 35, 72, 0.4);
}

body[data-theme="matrix"][data-matrix-variant="blue"] .brand-corner {
  border-color: rgba(65, 112, 173, 0.58);
  background: rgba(6, 16, 34, 0.92);
  box-shadow: 0 12px 28px rgba(9, 35, 72, 0.38);
}

body[data-theme="matrix"][data-matrix-variant="blue"] .brand-corner-img {
  filter: invert(1) brightness(1.12);
}

body[data-theme="matrix"][data-matrix-variant="blue"] p,
body[data-theme="matrix"][data-matrix-variant="blue"] .breadcrumb,
body[data-theme="matrix"][data-matrix-variant="blue"] .tag {
  color: #6f93be;
}

body[data-theme="matrix"][data-matrix-variant="blue"] .pill,
body[data-theme="matrix"][data-matrix-variant="blue"] .btn {
  border-color: rgba(74, 143, 246, 0.6);
  background: rgba(12, 28, 54, 0.86);
  color: #99c5ff;
}

body[data-theme="matrix"][data-matrix-variant="blue"] .btn {
  border: 1px solid rgba(74, 143, 246, 0.6);
}

body[data-theme="matrix"][data-matrix-variant="blue"] details {
  border-color: rgba(78, 129, 196, 0.58);
  background: rgba(7, 18, 37, 0.9);
}

body[data-theme="matrix"][data-matrix-variant="blue"] summary {
  color: #9dccff;
}

/* Module task list */
.module-tasks-label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b96a9;
}

.module-task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.module-task-item {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.04);
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.module-task-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.module-task-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #1d4ed8;
  text-decoration: none;
}

.module-task-title:hover {
  text-decoration: underline;
}

.module-task-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.module-task-desc {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #64748b;
}
