/*
  REVALYTICS — FIELD NOTE ARTICLE PAGE
  Shared stack: tokens → base → typography → buttons → wirebar → nav → footer → this file.
*/

/* ─── Outer card wrapper ────────────────────────────── */
.article-card-wrap {
  padding: 0 30px 20px;
}

.article-card-inner {
  background: #fff;
  border-radius: var(--rev-radius-lg);
  box-shadow: var(--rev-shadow-card);
  padding: 64px 73px;
}

@media (max-width: 900px) {
  .article-card-inner { padding: 48px 32px; }
}

@media (max-width: 640px) {
  #main               { margin-top: 72px !important; }
  .article-card-wrap  { padding: 0 12px 12px; }
  .article-card-inner { padding: 28px 18px; border-radius: 0; }
  .article-featured-img { margin-bottom: 20px; border-radius: 8px; }
}

/* ─── Article page wrapper ──────────────────────────── */
.article-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 0;
}

/* ─── Back link ─────────────────────────────────────── */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--rev-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rev-text-light);
  text-decoration: none;
  margin-bottom: 32px;
}
.article-back:hover { color: var(--rev-blue); }
.article-back svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ─── Category tag ──────────────────────────────────── */
.article-category {
  font-family: var(--rev-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rev-blue);
  margin-bottom: 14px;
}

/* ─── Title ─────────────────────────────────────────── */
.article-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--rev-text);
  margin-bottom: 12px;
}

/* ─── Subtitle ──────────────────────────────────────── */
.article-subtitle {
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 400;
  color: var(--rev-text-body);
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

/* ─── Author byline ─────────────────────────────────── */
.article-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--rev-border);
  border-bottom: 1px solid var(--rev-border);
  margin-bottom: 36px;
}

.article-byline-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.article-byline-photo img {
  width: 180%;
  height: 180%;
  display: block;
  margin-left: -40%;
  margin-top: -12%;
  object-fit: cover;
}

.article-byline-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--rev-text);
  margin-bottom: 2px;
}

.article-byline-meta {
  font-size: 13px;
  color: var(--rev-text-light);
}

/* ─── Featured image ────────────────────────────────── */
.article-featured-img {
  width: 100%;
  border-radius: 12px;
  display: block;
  margin-bottom: 40px;
}

/* ─── Share bar ─────────────────────────────────────── */
.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.share-label {
  font-size: 14px;
  color: var(--rev-text-light);
  font-weight: 500;
}

.share-buttons {
  display: flex;
  gap: 8px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--rev-border);
  background: #fff;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.share-btn:hover { border-color: var(--rev-blue); background: var(--rev-blue-25); }
.share-btn svg { width: 16px; height: 16px; }

/* ─── Body content ──────────────────────────────────── */
.article-content p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--rev-text-body);
  margin-bottom: 22px;
}

.article-content h2 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--rev-text);
  margin: 44px 0 16px;
}

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--rev-text);
  margin: 32px 0 10px;
}

.article-content strong {
  font-weight: 600;
  color: var(--rev-text);
}

.article-content ul,
.article-content ol {
  padding-left: 24px;
  margin-bottom: 22px;
}

.article-content li {
  font-size: 17px;
  line-height: 1.7;
  color: var(--rev-text-body);
  margin-bottom: 8px;
}

/* ─── Comparison table ──────────────────────────────── */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15px;
}

.article-content thead th {
  background: var(--rev-navy-900);
  color: rgba(255,255,255,0.75);
  font-family: var(--rev-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 18px;
  text-align: left;
  font-weight: 500;
}

.article-content tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--rev-border);
  color: var(--rev-text-body);
  vertical-align: top;
}

.article-content tbody tr:last-child td {
  background: var(--rev-blue-25);
  font-weight: 600;
  color: var(--rev-text);
}

.article-content table th,
.article-content table td {
  border-right: 1px solid var(--rev-border);
}
.article-content table th:last-child,
.article-content table td:last-child {
  border-right: none;
}

/* ─── Tags ──────────────────────────────────────────── */
.article-tags {
  margin-top: 48px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--rev-text-body);
}

/* ─── Author footer ─────────────────────────────────── */
.article-author-footer {
  margin-top: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--rev-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.author-photo-zoom {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
}

.author-photo-zoom img {
  width: 180%;
  height: 180%;
  display: block;
  margin-left: -40%;
  margin-top: -12%;
  object-fit: cover;
}

.article-author-footer-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--rev-text);
}

/* ─── Listen + Share row ────────────────────────────── */
.listen-share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}

.listen-share-row .article-audio-wrap { flex: 1; min-width: 0; }
.listen-share-row .share-bar          { flex-shrink: 0; margin-bottom: 0; }

@media (max-width: 600px) {
  .listen-share-row {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .listen-share-row .article-audio-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .listen-share-row .share-bar {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    gap: 6px;
  }

  /* Hide "Share" text on mobile — icons speak for themselves */
  .listen-share-row .share-label { display: none; }

  .listen-share-row .share-buttons { gap: 6px; }

  .listen-share-row .share-btn {
    width: 30px;
    height: 30px;
  }
}

/* ─── Custom audio player ───────────────────────────── */
.article-audio-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--rev-blue-25);
  border: 1px solid var(--rev-border);
  border-radius: 100px;
  padding: 7px 16px 7px 8px;
  height: 42px;
  box-sizing: border-box;
}

.ap-play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rev-blue);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  transition: background 0.2s, transform 0.1s;
}
.ap-play:hover  { background: #0049cc; }
.ap-play:active { transform: scale(0.94); }
.ap-play svg    { width: 12px; height: 12px; }
.ap-play #apIconPlay { margin-left: 1px; }

.ap-time {
  font-family: var(--rev-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--rev-text-light);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 30px;
}

.ap-track {
  flex: 1;
  height: 4px;
  background: rgba(0,0,0,0.1);
  border-radius: 100px;
  cursor: pointer;
  position: relative;
  min-width: 0;
}

.ap-fill {
  height: 100%;
  width: 0%;
  background: var(--rev-blue);
  border-radius: 100px;
  pointer-events: none;
  transition: width 0.1s linear;
}

@media (max-width: 600px) {
  .article-audio-wrap { padding: 6px 12px 6px 7px; gap: 8px; height: 40px; }
  .ap-play            { width: 26px; height: 26px; }
  .ap-play svg        { width: 10px; height: 10px; }
  .ap-dur             { display: none; }
}

/* ─── Mobile ────────────────────────────────────────── */
@media (max-width: 640px) {
  .article-title            { font-size: 26px; line-height: 1.1; }
  .article-byline           { gap: 10px; padding: 14px 0; margin-bottom: 24px; }
  .article-byline-photo     { width: 38px; height: 38px; }
  .article-byline-name      { font-size: 14px; }
  .article-byline-meta      { font-size: 12px; }
  .article-featured-img     { margin-bottom: 28px; border-radius: 8px; }
  .article-content p        { font-size: 15px; line-height: 1.7; margin-bottom: 18px; }
  .article-content h2       { font-size: 20px; margin: 32px 0 12px; }
  .article-content h3       { font-size: 16px; margin: 24px 0 8px; }
  .article-content li       { font-size: 15px; }
  .article-content table    { font-size: 12px; }
  .article-content thead th,
  .article-content tbody td { padding: 8px 10px; }
  .article-tags             { font-size: 13px; margin-top: 36px; }
  .article-author-footer    { margin-top: 20px; padding-top: 24px; }
  .share-bar                { margin-bottom: 24px; }
}
