/* ==========================================================
   Lensux guides, hubs and tools — reading layout on Liquid Glass.
   Content-first: one readable column (~68ch) on generous space.
   ========================================================== */

.article-wrap { padding-top: 28px; padding-bottom: 40px; }

.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: var(--fs-footnote); color: var(--text-secondary); }
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--text-tertiary); }
.breadcrumbs a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--target); min-width: var(--target); padding: 0 4px; color: var(--accent-text); }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--text-secondary); }

.article { max-width: 780px; margin: 0 auto; }
.article-head { padding: 28px 0 8px; }
.article-head h1 { font-size: var(--fs-large-title); font-weight: 700; letter-spacing: -0.028em; line-height: 1.08; }
.article-lead { margin-top: 20px; font-size: 1.25rem; line-height: 1.5; color: var(--text); }
.article-lead strong { font-weight: 600; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 18px; font-size: var(--fs-footnote); }

.takeaways, .toc { margin-top: 32px; padding: 24px 28px; }
.takeaways h2, .toc h2 { font-size: var(--fs-headline); margin-bottom: 12px; }
.takeaways ul { display: flex; flex-direction: column; gap: 10px; }
.takeaways li { position: relative; padding-left: 28px; color: var(--text); font-size: var(--fs-callout); line-height: 1.5; }
.takeaways li::before { content: ""; position: absolute; left: 4px; top: 0.45em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-fill); box-shadow: 0 0 0 4px var(--accent-soft); }
.toc ol { columns: 2; column-gap: 40px; list-style: decimal outside; padding-left: 1.4em; color: var(--text-secondary); font-size: var(--fs-callout); }
.toc li { break-inside: avoid; }
.toc li { padding: 0; }
.toc a { display: block; min-height: 44px; padding: 10px 0; line-height: 1.5; color: var(--accent-text); }
.toc a:hover { text-decoration: underline; }

.article-body { margin-top: 12px; }
.article-body > section { padding-top: 44px; scroll-margin-top: 90px; }
.article-body h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 700; margin-bottom: 16px; }
.article-body h3 { font-size: var(--fs-section); margin: 0 0 6px; }
.article-body p, .article-body li { font-size: var(--fs-body); line-height: 1.6; color: var(--text); }
.article-body p { max-width: 68ch; }
.article-body p + p { margin-top: 14px; }
.article-body a:not(.btn):not(.law-card):not(.blog-card) { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul:not(.check-list), .article-body ol:not(.steps):not(.heuristics) { margin: 12px 0 0 1.2em; list-style: disc; }
.article-body ol:not(.steps):not(.heuristics) { list-style: decimal; }
.article-body ul:not(.check-list) li + li, .article-body ol:not(.steps):not(.heuristics) li + li { margin-top: 6px; }
.article-body code { font-family: var(--font-mono); font-size: 0.95em; padding: 2px 6px; border-radius: 6px; background: var(--surface-strong); }
.formula { margin: 18px 0; }
.formula code { display: inline-block; padding: 14px 20px; font-size: 1.15rem; border-radius: var(--radius-md); background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--glass-edge); }

.check-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.2em; width: 20px; height: 20px; border-radius: 6px; background: var(--good-fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8.5 3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.checklist-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; margin-top: 18px; }
.checklist-grid > div { padding: 22px; border-radius: var(--radius-lg); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-1); }
.checklist-grid .check-list li { font-size: var(--fs-callout); }

.steps { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; counter-reset: step; }
.steps > li { position: relative; padding: 20px 22px 20px 70px; border-radius: var(--radius-lg); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-1); counter-increment: step; }
.steps > li::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-fill); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-footnote); }
.steps > li p { margin-top: 4px; color: var(--text-secondary); font-size: var(--fs-callout); }
.heuristics { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; counter-reset: h; }
.heuristics > li { position: relative; padding: 20px 22px 20px 70px; border-radius: var(--radius-lg); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-1); counter-increment: h; }
.heuristics > li::before { content: counter(h); position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-strong); color: var(--accent-text); font-family: var(--font-display); font-weight: 700; }
.heuristics p { font-size: var(--fs-callout); color: var(--text-secondary); }
.heur-ex { margin-top: 8px; }
.heur-ex strong { color: var(--text); }

.table-wrap { margin-top: 16px; }
.table-wrap caption { text-align: left; padding: 10px 16px; font-size: var(--fs-footnote); color: var(--text-secondary); }
.table-wrap td { color: var(--text-secondary); }
.table-wrap tbody th { color: var(--text); font-weight: 600; }

.lensux-note { margin-top: 22px; padding: 20px 22px; border-radius: var(--radius-lg); background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent-fill); }
.lensux-note strong { display: block; font-family: var(--font-display); margin-bottom: 4px; color: var(--accent-text); }
.lensux-note p { font-size: var(--fs-callout); }

.law-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; margin-top: 8px; }
.law-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; transition: transform var(--dur) var(--spring), box-shadow var(--dur) ease; }
.law-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-2); }
.law-card h3 { font-size: var(--fs-section); }
.law-card p { font-size: var(--fs-callout); color: var(--text-secondary) !important; }

.article-body #faq { padding-top: 48px; }
.article-body .faq-list { margin-top: 8px; }
.sources { padding-top: 44px; }
.sources h2 { font-size: var(--fs-section) !important; }
.sources ol { margin-left: 1.2em !important; }
.sources li { font-size: var(--fs-footnote) !important; color: var(--text-secondary) !important; }
.sources a { word-break: break-word; }

.author-box { display: flex; gap: 18px; align-items: flex-start; margin-top: 48px; padding: 24px; }
.author-name { font-family: var(--font-display); font-weight: 700; }
.author-name a { color: var(--text); }
.author-role { font-size: var(--fs-footnote); margin-bottom: 8px; }
.author-box p:last-child { font-size: var(--fs-callout); }

.guide-cta { max-width: 780px; margin: 44px auto 0; padding: 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.guide-cta h2 { font-size: var(--fs-title); }
.guide-cta > p:not(.cta-note) { font-size: var(--fs-body); max-width: 46ch; }
.article-body .guide-cta { margin: 40px 0 0; }

.related { max-width: 1060px; margin: 64px auto 0; }
.related h2 { font-size: var(--fs-title); margin-bottom: 20px; }

/* ---------- contrast checker ---------- */
.contrast-tool { margin-top: 28px; padding: 26px; }
.ct-inputs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: end; }
.ct-field label { display: block; margin-bottom: 6px; font-size: var(--fs-footnote); font-weight: 600; color: var(--text-secondary); }
.ct-pick { display: flex; gap: 8px; }
.ct-pick input[type=color] { width: 52px; height: 48px; padding: 4px; border-radius: var(--radius-sm); border: 1px solid var(--surface-border); background: var(--bg-elev); cursor: pointer; }
.ct-pick input[type=text] { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--surface-border); background: var(--bg-elev); color: var(--text); font-family: var(--font-mono); font-size: var(--fs-body); text-transform: uppercase; }
.ct-pick input[type=text]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ct-pick input.is-bad { border-color: var(--bad-fill); }
.ct-swap { margin-bottom: 2px; font-size: 1.1rem; }
.ct-result { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 24px; }
.ct-ratio { display: flex; flex-direction: column; }
.ct-ratio span { font-size: var(--fs-footnote); color: var(--text-secondary); }
.ct-ratio strong { font-family: var(--font-display); font-size: 2.75rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ct-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-badges li { padding: 7px 12px 7px 30px; position: relative; border-radius: var(--radius-pill); font-size: var(--fs-footnote); font-weight: 600; background: color-mix(in srgb, var(--bad-fill) 14%, var(--bg-elev)); color: var(--bad); }
.ct-badges li::before { content: "✕"; position: absolute; left: 12px; }
.ct-badges li.pass { background: color-mix(in srgb, var(--good-fill) 16%, var(--bg-elev)); color: var(--good); }
.ct-badges li.pass::before { content: "✓"; }
.ct-preview { margin-top: 22px; padding: 24px; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--surface-border); }
.ct-preview p { color: inherit; max-width: none; }
.ct-preview .ct-large { font-size: 24px; font-weight: 600; margin-bottom: 8px; line-height: 1.35; }
.ct-btn { display: inline-flex; align-items: center; margin-top: 14px; min-height: 40px; padding: 0 18px; border-radius: var(--radius-pill); border: 2px solid currentColor; font-weight: 600; }
.ct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.ct-fix-msg { font-size: var(--fs-callout); }

@media (max-width: 640px) {
  .toc ol { columns: 1; }
  .steps > li, .heuristics > li { padding-left: 62px; }
  .ct-inputs { grid-template-columns: 1fr; }
  .ct-swap { justify-self: center; transform: rotate(90deg); }
  .author-box { flex-direction: column; }
  .article-lead { font-size: 1.125rem; }
}
.sources a, .author-name a { display: inline-block; min-height: 44px; padding: 10px 0; }
.sources li { padding: 0; }
