/* Soma Medical Magazine v2 — Blog Article Template */
:root {
  --art-measure: 70ch;
  --art-warn-bg: #FFFBEB;
  --art-warn-border: #D97706;
  --art-warn-ink: #78350F;
  --art-alert-bg: #FEF2F2;
  --art-alert-border: #DC2626;
  --art-alert-ink: #7F1D1D;
}

html.dark {
  --art-warn-bg: rgba(217, 119, 6, 0.14);
  --art-warn-border: #F59E0B;
  --art-warn-ink: #FDE68A;
  --art-alert-bg: rgba(220, 38, 38, 0.16);
  --art-alert-border: #F87171;
  --art-alert-ink: #FECACA;
}

.art-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.art-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 18px;
}

.art-crumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  background: var(--teal-soft);
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity .15s, transform .15s;
}

.art-crumb a:hover {
  opacity: .9;
  transform: translateY(-1px);
}

html.dark .art-crumb a {
  color: var(--mint);
}

.art-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.art-card {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px 38px;
  box-shadow: var(--shadow-md);
}

.art-cover {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: 16px;
  margin: 0 0 24px;
  box-shadow: 0 12px 30px rgba(11, 31, 42, .12);
  background: var(--teal-soft);
}

html.dark .art-cover {
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  border: 1px solid var(--line);
}

.art-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

html.dark .art-tag {
  color: var(--mint);
}

.art-card h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(26px, 3.3vw, 38px);
  line-height: 1.18;
  letter-spacing: -.02em;
  margin: 0 0 14px;
  color: var(--ink);
  max-width: 28ch;
}

.art-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.art-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.art-badge.source {
  background: var(--teal-soft);
  border-color: transparent;
  color: var(--teal);
}

html.dark .art-badge.source {
  color: var(--mint);
}

.art-body {
  max-width: var(--art-measure);
}

.art-card p,
.art-card li {
  font-family: var(--sans);
  font-size: clamp(17px, 1.1vw, 18px);
  line-height: 1.72;
  color: var(--ink);
}

.art-card p {
  margin: 0 0 16px;
}

.art-card ul,
.art-card ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.art-card li {
  margin: 6px 0;
}

.art-card h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(21px, 2.3vw, 26px);
  line-height: 1.26;
  margin: 32px 0 12px;
  color: var(--ink);
  scroll-margin-top: 96px;
}

.art-card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.32;
  margin: 22px 0 8px;
  color: var(--teal);
  scroll-margin-top: 96px;
}

html.dark .art-card h3 {
  color: var(--mint);
}

.art-card a:not(.art-btn):not(.art-inline-btn) {
  color: var(--teal);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(13, 148, 136, .35);
  text-underline-offset: 3px;
}

html.dark .art-card a:not(.art-btn):not(.art-inline-btn) {
  color: var(--mint);
  text-decoration-color: rgba(43, 217, 180, .4);
}

.keybox {
  background: var(--teal-soft);
  border: 1px solid rgba(13, 148, 136, .22);
  border-left: 4px solid var(--teal);
  padding: 18px 20px;
  border-radius: 12px;
  margin: 20px 0 24px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
}

html.dark .keybox {
  border-color: rgba(43, 217, 180, .25);
  border-left-color: var(--mint);
}

.art-card blockquote {
  margin: 22px 0;
  padding: 18px 20px;
  background: var(--art-warn-bg);
  border-left: 4px solid var(--art-warn-border);
  border-radius: 12px;
  color: var(--ink);
}

.art-card blockquote h3 {
  margin-top: 0;
  color: var(--art-warn-ink);
}

.art-card .alert {
  margin: 22px 0;
  padding: 16px 20px;
  background: var(--art-alert-bg);
  border-left: 4px solid var(--art-alert-border);
  border-radius: 12px;
  color: var(--art-alert-ink);
  font-weight: 500;
}

.art-card .inline-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--teal-soft);
  border: 1px solid rgba(13, 148, 136, .22);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 24px 0;
}

.art-card .inline-cta b {
  font-size: 15.5px;
  color: var(--ink);
}

.art-card .inline-cta span {
  font-size: 13.5px;
  color: var(--muted);
}

.art-card .inline-cta a {
  margin-left: auto;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 10px;
  white-space: nowrap;
  text-decoration: none;
}

html.dark .art-card .inline-cta a {
  background: var(--mint);
  color: #05221C;
}

.art-card .qcta {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  background: var(--navy);
  color: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  margin: 28px 0 10px;
  border: 1px solid rgba(255, 255, 255, .08);
}

.art-card .qcta p {
  color: #B8CDD9;
  font-size: 14.5px;
  margin: 6px 0 0;
}

.art-card .qcta button {
  background: #2BD9B4;
  color: #06201B;
  border: 0;
  border-radius: 10px;
  padding: 11px 18px;
  font-weight: 700;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.art-card .qcta button.ghostq {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
}

.art-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.art-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.art-table th,
.art-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}

.art-table th {
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 700;
}

html.dark .art-table th {
  color: var(--mint);
}

.art-sources,
.art-card .src {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.art-sources h3,
.art-card .src b {
  display: block;
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: .06em;
}

html.dark .art-sources h3,
html.dark .art-card .src b {
  color: var(--mint);
}

.art-sources li,
.art-card .src li,
.art-card .src p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

.art-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.art-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--teal);
  color: #fff;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  transition: transform .15s, opacity .15s;
}

.art-btn:hover {
  transform: translateY(-1px);
  opacity: .94;
}

html.dark .art-btn {
  background: var(--mint);
  color: #05221C;
}

.art-btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

html.dark .art-btn.ghost {
  background: rgba(255, 255, 255, .03);
  color: var(--ink);
}

/* Sticky Right Sidebar */
.art-side {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.art-side-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.art-side-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.art-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.art-toc a {
  display: block;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  text-decoration: none;
  transition: color .15s, background .15s, border-color .15s;
}

.art-toc a:hover {
  color: var(--teal);
  background: var(--teal-soft);
  border-left-color: var(--teal);
}

html.dark .art-toc a:hover {
  color: var(--mint);
  border-left-color: var(--mint);
}

.art-soma-cta {
  background: linear-gradient(145deg, #0B1F2A, #123246);
  color: #EDF4FA;
  border: 1px solid #22445C;
}

.art-soma-cta .art-side-title {
  color: #FFFFFF;
}

.art-soma-cta p {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #B8CDD9;
}

.art-soma-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #2BD9B4;
  color: #05221C;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}

.art-soma-btn:hover {
  transform: translateY(-1px);
  opacity: .95;
}

.art-related {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.art-related a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}

.art-related a:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

html.dark .art-related a:hover {
  border-color: var(--mint);
}

.art-related-tag {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--teal);
  margin-bottom: 3px;
}

html.dark .art-related-tag {
  color: var(--mint);
}

.art-related-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.38;
  color: var(--ink);
}

@media (max-width: 900px) {
  .art-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .art-side {
    position: static;
  }
}

@media (max-width: 600px) {
  .art-wrap {
    padding: 16px 14px 52px;
  }
  .art-card {
    padding: 20px 16px;
    border-radius: 16px;
  }
  .art-cover {
    border-radius: 12px;
    margin-bottom: 18px;
  }
  .art-card .inline-cta a {
    margin-left: 0;
  }
}
