﻿/* LoomiTV — article page styles (article.html).
   Loaded after blog.css, so :root tokens (--radius, --maxw) and the shared
   .guide-grid / .guide-card / .cover-* classes (used by Related Articles)
   are already defined there and reused here without redefinition. */

:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }

/* ---- Reading progress ---- */
.read-progress{ position:fixed; top:0; left:0; right:0; height:3px; z-index:101; background:transparent; pointer-events:none; }
.read-progress-bar{ height:100%; width:0%; background:linear-gradient(90deg, var(--gold), #F2C766); transition:width .1s linear; }

/* ---- Hero ---- */
.article-hero{ padding:150px 0 36px; border-bottom:1px solid var(--line); margin-bottom:40px; }

.breadcrumbs{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:12.5px; color:var(--muted-2); margin-bottom:18px; }
.breadcrumbs a{ color:var(--muted-2); }
.breadcrumbs a:hover{ color:var(--gold); }
.crumb-current{ color:var(--muted); max-width:360px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.article-hero .eyebrow{ font-size:12px; letter-spacing:0.14em; text-transform:uppercase; color:var(--gold); font-weight:600; margin-bottom:14px; }
.article-hero h1{ font-size:clamp(30px,4.5vw,46px); margin-bottom:20px; max-width:820px; }

.article-meta-row{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; color:var(--muted); font-size:13px; margin-bottom:24px; }
.meta-sep{ color:var(--muted-2); }

.share-row{ display:flex; align-items:center; gap:10px; }
.share-label{ font-size:11.5px; font-weight:700; color:var(--muted-2); text-transform:uppercase; letter-spacing:0.06em; margin-inline-end:4px; }
.share-btn{
  position:relative; display:flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:50%; border:1px solid var(--line-strong);
  background:none; color:var(--muted); cursor:pointer; transition:all .2s ease;
}
.share-btn svg{ width:16px; height:16px; }
.share-btn:hover{ border-color:var(--fg); color:var(--fg); }
.share-copied{
  position:absolute; bottom:calc(100% + 8px); left:50%; transform:translateX(-50%) translateY(4px);
  background:var(--fg); color:var(--bg); font-size:11px; font-weight:600; padding:4px 9px; border-radius:6px;
  white-space:nowrap; opacity:0; pointer-events:none; transition:all .18s ease;
}
.share-btn.copied .share-copied{ opacity:1; transform:translateX(-50%) translateY(0); }

/* ---- Layout: TOC sidebar + content ---- */
.article-layout{ display:grid; grid-template-columns:220px 1fr; gap:56px; align-items:start; padding-bottom:20px; }

.toc-sidebar{ position:sticky; top:100px; }
.toc-inner{ border-inline-start:2px solid var(--line); padding-inline-start:18px; }
.toc-title{ font-size:11px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:var(--muted-2); margin-bottom:14px; }
#tocNav{ display:flex; flex-direction:column; gap:2px; }
#tocNav a{
  display:block; margin-inline-start:-20px; padding-block:7px; padding-inline:18px 0; font-size:13px; color:var(--muted);
  line-height:1.4; border-inline-start:2px solid transparent; transition:color .2s ease, border-color .2s ease;
}
#tocNav a:hover{ color:var(--fg); }
#tocNav a.active{ color:var(--gold); border-inline-start-color:var(--gold); font-weight:600; }

.article-mobile-toc{ display:none; margin-bottom:28px; }
.toc-toggle{
  width:100%; display:flex; align-items:center; justify-content:space-between;
  background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius);
  padding:13px 16px; color:var(--fg); font-size:13.5px; font-weight:600; cursor:pointer; font-family:inherit;
}
.toc-chevron{ width:16px; height:16px; transition:transform .2s ease; flex-shrink:0; }
.toc-toggle[aria-expanded="true"] .toc-chevron{ transform:rotate(180deg); }
.toc-mobile-panel{
  display:none; flex-direction:column; gap:2px; background:var(--bg-card);
  border:1px solid var(--line); border-top:none; border-radius:0 0 var(--radius) var(--radius);
  padding:6px 16px 14px; margin-top:-1px;
}
.toc-mobile-panel.open{ display:flex; }
.toc-mobile-panel a{ padding:9px 0; font-size:13px; color:var(--muted); border-bottom:1px solid var(--line); }
.toc-mobile-panel a:last-child{ border-bottom:none; }
.toc-mobile-panel a.active{ color:var(--gold); font-weight:600; }

/* ---- Article content ---- */
.article-content{ max-width:760px; min-width:0; font-size:15.5px; color:var(--muted); line-height:1.7; }
.article-content h2{ font-size:24px; color:var(--fg); margin:44px 0 16px; scroll-margin-top:110px; }
.article-content h3{ font-size:17px; color:var(--fg); margin-bottom:8px; }
.article-content p{ margin-bottom:16px; }
.article-content ul{ margin:0 0 20px; padding-inline-start:20px; list-style:disc; }
.article-content ul li{ margin-bottom:8px; }

.article-steps{ list-style:none; padding:0; margin:0 0 24px; display:flex; flex-direction:column; gap:22px; }
.article-steps li{ display:flex; gap:16px; }
.step-num{
  flex-shrink:0; width:30px; height:30px; border-radius:50%; background:var(--bg-card);
  border:1px solid var(--line-strong); display:flex; align-items:center; justify-content:center;
  font-family:var(--font-mono); font-size:13px; font-weight:600; color:var(--gold);
}
.step-copy h3{ margin-bottom:6px; }
.step-copy p{ margin-bottom:0; font-size:14.5px; }

/* ---- Callouts ---- */
.callout{ display:flex; gap:14px; padding:18px 20px; border-radius:var(--radius); margin:0 0 22px; border:1px solid; }
.callout-icon{ flex-shrink:0; width:22px; height:22px; }
.callout-icon svg{ width:100%; height:100%; }
.callout-body strong{ display:block; font-size:12px; font-weight:700; letter-spacing:0.05em; text-transform:uppercase; margin-bottom:5px; }
.callout-body p{ margin:0; font-size:14px; color:var(--muted); }

.callout-tip{ background:rgba(227,166,62,0.08); border-color:rgba(227,166,62,0.3); color:var(--gold); }
.callout-note{ background:rgba(46,95,168,0.12); border-color:rgba(46,95,168,0.35); color:#7DA8E8; }
.callout-warning{ background:rgba(198,52,42,0.08); border-color:rgba(198,52,42,0.3); color:#E0776E; }

/* ---- Screenshot placeholder — honest visual: no real screenshots exist ---- */
.article-shot{ margin:0 0 26px; }
.shot-placeholder{
  aspect-ratio:16/8; max-width:100%; background:linear-gradient(135deg, var(--bg-card), var(--bg-warm));
  border:1px dashed var(--line-strong); border-radius:var(--radius);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color:var(--muted-2);
}
.shot-placeholder svg{ width:32px; height:32px; }
.shot-placeholder span{ font-size:12px; font-weight:600; }
.article-shot figcaption{ font-size:12.5px; color:var(--muted-2); margin-top:8px; text-align:center; }

/* A real Screenshot block image — deliberately NOT forced into the
   placeholder's 16:8 aspect-ratio box, since an admin-provided
   screenshot can be any real aspect ratio; cropping it to fit would
   misrepresent the actual UI being documented. */
.article-shot img{ display:block; width:100%; max-width:100%; height:auto; border-radius:var(--radius); border:1px solid var(--line); }

/* ---- FAQ ---- */
.faq-list{ display:flex; flex-direction:column; gap:10px; margin-bottom:8px; }
.faq-item{ background:var(--bg-card); border:1px solid var(--line); border-radius:var(--radius); padding:16px 20px; }
.faq-item summary{
  cursor:pointer; font-weight:600; color:var(--fg); font-size:14.5px; list-style:none;
  display:flex; justify-content:space-between; align-items:center; gap:12px;
}
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{ content:'+'; font-size:20px; color:var(--muted-2); flex-shrink:0; }
.faq-item[open] summary::after{ content:'\2212'; }
.faq-item p{ margin:14px 0 0; color:var(--muted); font-size:14px; }

/* ---- Tags — reuses blog.css's .cat-chip as a real link to a
   tag-filtered Learning Center view, not a fresh component. ---- */
.article-tags{ display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 32px; }
.article-tags .cat-chip{ text-decoration:none; }

/* ---- Related articles ---- */
.related-section{ padding:56px 0 8px; border-top:1px solid var(--line); margin-top:20px; }
.related-section h2{ font-size:22px; margin-bottom:22px; }

/* ---- Admin preview banner — only ever shown via a signed preview
   link (js/admin.js's Preview action), never for a real visitor. ---- */
.preview-banner{
  position:sticky; top:0; z-index:100; background:var(--gold); color:#241802;
  text-align:center; font-size:13px; font-weight:600; padding:10px 16px;
}

/* ---- Support card ---- */
.support-card{
  display:flex; gap:24px; align-items:flex-start; background:var(--bg-card);
  border:1px solid var(--line); border-radius:var(--radius); padding:36px; margin:40px 0 90px;
}
.support-icon{
  flex-shrink:0; width:52px; height:52px; border-radius:50%; background:rgba(227,166,62,0.12);
  border:1px solid rgba(227,166,62,0.3); display:flex; align-items:center; justify-content:center; color:var(--gold);
}
.support-icon svg{ width:24px; height:24px; }
.support-body h2{ font-size:22px; margin-bottom:8px; }
.support-body p{ color:var(--muted); font-size:14px; margin-bottom:18px; }
.support-body .btn{ margin-bottom:14px; }
.support-response{ font-size:12.5px; color:var(--muted-2); margin-bottom:0; }

@media (max-width:980px){
  .article-layout{ grid-template-columns:1fr; }
  .toc-sidebar{ display:none; }
  .article-mobile-toc{ display:block; }
  .article-content{ max-width:100%; }
}

/* ======================================================================
   MOBILE (320px–768px) — its own layer, matching the pattern used across
   the rest of the site. Nothing above this point is touched by it.
   ====================================================================== */
@media (max-width:768px){
  html, body{ max-width:100%; overflow-x:hidden; }

  .article-hero{ padding:110px 0 26px; }
  .article-hero h1{ font-size:clamp(24px, 7.5vw, 34px); overflow-wrap:break-word; }
  .crumb-current{ max-width:180px; }
  .article-meta-row{ font-size:12px; gap:8px; }

  .article-content{ font-size:15px; }
  .article-content h2{ font-size:20px; margin:34px 0 14px; }
  .article-steps li{ gap:12px; }
  .step-num{ width:26px; height:26px; font-size:12px; }

  .callout{ padding:15px 16px; gap:11px; }

  .related-section{ padding:40px 0 4px; }

  .support-card{ flex-direction:column; padding:24px; gap:16px; margin-bottom:64px; }
  .support-body h2{ font-size:19px; }
}
