/* CMS content styles — built on the theme variables in resources/css/app.css */

.cms-preview-bar { position: sticky; top: 0; z-index: 90; padding: 8px 16px; text-align: center; background: #191c20; color: #f2efe9; font: 500 12px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }

.cms-title { font-family: var(--font-display); font-size: clamp(32px, 4.4vw, 54px); line-height: 1.05; letter-spacing: -.025em; margin-bottom: 18px; }
.cms-featured { margin-bottom: 48px; }
.cms-featured-inline { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 32px; }

/* Rich-text content */
.cms-prose { max-width: 820px; font-size: 17px; line-height: 1.75; color: var(--text); }
.cms-prose > * + * { margin-top: 1.1em; }
.cms-prose h2, .cms-prose h3, .cms-prose h4 { font-family: var(--font-display); letter-spacing: -.015em; line-height: 1.2; margin-top: 1.8em; }
.cms-prose h2 { font-size: 30px; }
.cms-prose h3 { font-size: 23px; }
.cms-prose h4 { font-size: 19px; }
.cms-prose a { color: var(--copper); text-underline-offset: 3px; }
.cms-prose a:hover { color: var(--copper-2); }
.cms-prose ul, .cms-prose ol { padding-left: 1.4em; }
.cms-prose li + li { margin-top: .35em; }
.cms-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.cms-prose figure figcaption { font: 12px var(--font-mono); color: var(--muted); margin-top: 8px; letter-spacing: .06em; }
.cms-prose blockquote { border-left: 3px solid var(--copper); padding: 6px 0 6px 22px; color: var(--muted); font-size: 19px; font-style: italic; }
.cms-prose code { font: 14px var(--font-mono); background: var(--bg-alt); padding: 2px 6px; border-radius: 4px; }
.cms-prose pre { background: #191c20; color: #f2efe9; padding: 18px 20px; border-radius: 10px; overflow-x: auto; }
.cms-prose pre code { background: none; padding: 0; color: inherit; }
.cms-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cms-prose th, .cms-prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.cms-prose th { background: var(--bg-alt); font-family: var(--font-display); }
.cms-prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.cms-prose iframe, .cms-prose video { max-width: 100%; border-radius: 10px; }

/* Landing / post hero */
.cms-hero { position: relative; padding: 150px clamp(28px, 6vw, 96px) 110px; color: #f2efe9; background: #12151a; overflow: hidden; }
.cms-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--hero-img, none); background-size: cover; background-position: center; opacity: .38; }
.cms-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,14,16,.2), rgba(12,14,16,.85)); }
.cms-hero-inner { position: relative; z-index: 1; max-width: 860px; }
.cms-hero h1 { font-family: var(--font-display); font-size: clamp(38px, 5.6vw, 72px); line-height: 1.02; letter-spacing: -.03em; margin: 14px 0 20px; }
.cms-hero-sub { font-size: 19px; color: rgba(242,239,233,.82); max-width: 640px; margin-bottom: 30px; }
.cms-hero .btn-solid { background: #e8853d; color: #0c0e10; }
.cms-hero-post { padding-bottom: 80px; }
.cms-hero-post .cms-title { color: #f2efe9; }
.cms-hero-post .cms-meta, .cms-hero-post .cms-crumbs, .cms-hero-post .cms-crumbs a { color: rgba(242,239,233,.75); }

/* Layout with sidebar */
.cms-with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.cms-sidebar { display: grid; gap: 18px; position: sticky; top: 96px; }
.cms-side-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.cms-side-label { display: block; font: 500 11px var(--font-mono); letter-spacing: .14em; color: var(--copper); margin-bottom: 12px; }
.cms-side-list { list-style: none; display: grid; gap: 10px; }
.cms-side-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; line-height: 1.4; }
.cms-side-list a { color: var(--text); text-decoration: none; }
.cms-side-list a:hover { color: var(--copper); }
.cms-side-list small { color: var(--muted); font: 11px var(--font-mono); white-space: nowrap; padding-top: 2px; }
.cms-side-cta h3 { font-family: var(--font-display); font-size: 20px; line-height: 1.25; margin-bottom: 16px; }
.cms-search div { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); }
.cms-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 12px; font: 15px var(--font-body); color: var(--text); }
.cms-search input:focus { outline: none; }
.cms-search button { border: 0; background: var(--copper); color: #fff; padding: 0 14px; cursor: pointer; font-size: 16px; }

/* Cards */
.cms-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.cms-post-grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cms-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: transform .2s, border-color .2s; }
.cms-card:hover { transform: translateY(-3px); border-color: var(--copper); }
.cms-card-img { display: block; aspect-ratio: 16 / 9; background: var(--bg-alt); overflow: hidden; }
.cms-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cms-card-ph { display: grid; place-items: center; height: 100%; font: 600 13px var(--font-mono); letter-spacing: .2em; color: var(--copper); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
.cms-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cms-card h3 { font-family: var(--font-display); font-size: 19px; line-height: 1.3; }
.cms-card h3 a { color: var(--text); text-decoration: none; }
.cms-card h3 a:hover { color: var(--copper); }
.cms-card p { color: var(--muted); font-size: 14.5px; }
.cms-read { margin-top: auto; padding-top: 6px; color: var(--copper); font: 600 14px var(--font-display); text-decoration: none; }
.cms-meta { font: 12px var(--font-mono); color: var(--muted); letter-spacing: .04em; }
.cms-meta a { color: var(--copper); text-decoration: none; }

/* Article */
.cms-article { min-width: 0; }
.cms-article-wide { max-width: 900px; margin: 0 auto; }
.cms-article-narrow { max-width: 720px; margin: 0 auto; }
.cms-article .cms-meta { margin-bottom: 30px; }
.cms-crumbs { font: 12px var(--font-mono); color: var(--muted); margin-bottom: 18px; letter-spacing: .04em; }
.cms-crumbs a { color: var(--muted); text-decoration: none; }
.cms-crumbs a:hover { color: var(--copper); }
.cms-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cms-tags a { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font: 12px var(--font-mono); color: var(--muted); text-decoration: none; background: var(--bg); }
.cms-tags a:hover { border-color: var(--copper); color: var(--copper); }
.cms-post-tags { margin-top: 40px; }
.cms-share { display: flex; align-items: center; gap: 10px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.cms-share span { font: 500 11px var(--font-mono); letter-spacing: .14em; color: var(--muted); text-transform: uppercase; margin-right: 6px; }
.cms-share a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--text); text-decoration: none; }
.cms-share a:hover { border-color: var(--copper); color: var(--copper); }
.cms-related { margin-top: 64px; }
.cms-related h2 { font-family: var(--font-display); font-size: 26px; margin-bottom: 22px; }

.cms-empty { padding: 60px 24px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.cms-empty h3 { font-family: var(--font-display); color: var(--text); margin-bottom: 6px; }
.cms-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 36px; font: 14px var(--font-display); }
.cms-pager a { color: var(--copper); text-decoration: none; font-weight: 600; }
.cms-pager span { color: var(--line); }
.cms-pager em { font: 12px var(--font-mono); color: var(--muted); font-style: normal; }

@media (max-width: 980px) {
    .cms-with-sidebar { grid-template-columns: 1fr; }
    .cms-sidebar { position: static; }
}
@media (max-width: 600px) {
    .cms-hero { padding: 120px 16px 80px; }
    .cms-prose { font-size: 16px; }
}
