/* Article typography — inspired by Wiley HTML Online Proofing (Wiley.css subset) */

:root {
  --wiley-ink: #1f1f1f;
  --wiley-heading: #1c1d1e;
  --wiley-link: #005274;
  --wiley-insert: #c8e6c9;
  --wiley-delete: #ffcdd2;
  --wiley-query: #fff8e1;
}

.article-html {
  font-family: "Open Sans", system-ui, sans-serif;
  letter-spacing: 0.03em;
  color: var(--wiley-ink);
  font-size: 14px;
  line-height: 1.55;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 32px 80px;
}

.article-html .journal-meta {
  font-size: 13px;
  color: #5a738e;
  margin-bottom: 8px;
}

.article-html .article-type {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #6c757d;
  margin-bottom: 6px;
}

.article-html .article-title {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--wiley-heading);
  line-height: 1.3;
  margin: 0 0 16px;
}

.article-html .creators {
  font-size: 14px;
  line-height: 20px;
  margin-bottom: 12px;
}

.article-html .creator .link::after {
  content: ",";
  vertical-align: super;
}

.article-html .creator .link:last-child::after {
  content: "";
}

.article-html .creator sup.link {
  font-size: 11px;
  color: var(--wiley-link);
}

.article-html .corr-star {
  color: #c00;
}

.article-html .affiliation-lines {
  font-size: 13px;
  margin-bottom: 20px;
}

.article-html .creator {
  margin-right: 0.35em;
}

.article-html .creator-name-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--wiley-link);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.article-html .creator-name-btn:hover {
  text-decoration-style: solid;
  color: #003d56;
}

.article-html .affiliation-lines .affil-line--editable {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 2px 4px;
  margin: 0 -4px 4px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 3px;
}

.article-html .affiliation-lines .affil-line--editable:hover {
  background: #e8f0f5;
  color: var(--wiley-link);
}

.article-html .affiliation-lines .affil-line {
  display: block;
  margin-bottom: 4px;
}

.article-html .affiliation-lines sup {
  margin-right: 4px;
}

.article-html .dates-block {
  font-size: 13px;
  margin-bottom: 14px;
}

.article-html .abstract-block {
  margin: 20px 0;
  padding: 12px 16px;
  background: #f8f9fa;
  border-left: 3px solid var(--wiley-link);
}

.article-html .abstract-block h2 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
}

.article-html h2.section-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--wiley-heading);
  margin: 28px 0 12px;
  counter-increment: section;
}

.article-html h2.section-title::before {
  content: counter(section) ". ";
}

.article-html {
  counter-reset: section;
}

.article-html p.editable,
.article-html .caption.editable,
.article-html td.editable,
.article-html th.editable {
  outline: none;
  border-radius: 2px;
  transition: background 0.15s;
}

.article-html p.editable:focus,
.article-html .caption.editable:focus {
  background: rgba(0, 82, 116, 0.06);
  box-shadow: 0 0 0 1px rgba(0, 82, 116, 0.25);
}

.article-html p {
  margin: 0 0 12px;
}

/* Inline corrections only (no paragraph block highlight) */
.article-html ins.change-insert,
.article-html .change-insert {
  text-decoration: none;
  padding: 0 1px;
  border-radius: 2px;
}

.article-html del.change-delete,
.article-html .change-delete {
  text-decoration: line-through;
  padding: 0 1px;
  border-radius: 2px;
}

/* Author — blue */
.article-html .change-insert--author {
  background: #b3d7ff;
  color: #003d7a;
}

.article-html .change-delete--author {
  background: #dbeafe;
  color: #1e40af;
}

/* Editor — red */
.article-html .change-insert--editor {
  background: #fecaca;
  color: #991b1b;
}

.article-html .change-delete--editor {
  background: #fee2e2;
  color: #b91c1c;
}

/* Legacy classes without role suffix default to author blue */
.article-html ins.change-insert:not([class*="--"]),
.article-html .change-insert:not([class*="--"]) {
  background: #b3d7ff;
  color: #003d7a;
}

.article-html del.change-delete:not([class*="--"]),
.article-html .change-delete:not([class*="--"]) {
  background: #dbeafe;
  color: #1e40af;
}

.article-html .diff-preview ins,
.article-html .diff-preview del {
  padding: 0 1px;
}

.article-html .has-query {
  border-bottom: 2px solid #bb9000;
  background: var(--wiley-query);
}

.article-html .figure-block,
.article-html .table-block {
  margin: 24px 0;
  padding: 12px;
  border: 1px solid #d8d9da;
  background: #fff;
}

.article-html .figure-placeholder {
  height: 160px;
  background: linear-gradient(135deg, #eef2f5, #dfe6eb);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 13px;
  margin-bottom: 8px;
}

.article-html .fig-label,
.article-html .tbl-label {
  font-weight: 700;
  font-size: 13px;
}

.article-html table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.article-html thead th {
  font-weight: 700;
  font-size: 14px;
  background: #f0f2f4;
  border: 1px solid #d8d9da;
  padding: 8px;
}

.article-html td {
  border: 1px solid #d8d9da;
  padding: 8px;
}

.article-html .cite-ref a {
  color: var(--wiley-link);
  text-decoration: none;
  font-weight: 600;
}

.article-html .cite-asset {
  font-style: italic;
}

.article-html .references-block {
  margin-top: 32px;
}

.article-html .references-block h2 {
  font-size: 16px;
  font-weight: 700;
}

.article-html .ref-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  padding-left: 0;
  text-indent: 0;
}

.article-html .ref-item-body {
  flex: 1;
  min-width: 0;
}

.article-html .ref-delete-btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-top: 2px;
  padding: 0;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #f8f9fa;
  color: #005274;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.article-html .ref-delete-btn:hover,
.article-html .ref-delete-btn:focus-visible {
  background: #eef4f7;
  color: #c00;
  border-color: #adb5bd;
  outline: none;
}

.article-html .ref-item .ref-text:focus {
  outline: 2px solid rgba(0, 82, 116, 0.25);
  outline-offset: 2px;
  border-radius: 2px;
}

.article-html .ref-doi-link,
.article-html .article-doi-link {
  color: var(--wiley-link);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.article-html .ref-doi-link:hover,
.article-html .ref-doi-link:focus,
.article-html .article-doi-link:hover,
.article-html .article-doi-link:focus {
  text-decoration: underline;
}

.article-html .ref-doi-link {
  display: inline-block;
  margin-left: 4px;
}

.article-html .math-block {
  text-align: center;
  margin: 16px 0;
  padding: 12px;
  background: #fafbfc;
}
