/* Cyber Regulation: site styles on top of the Secuvi layout kit.
   The kit (fonts.css, dashboard.css, layout.css) provides the shell, colours and components;
   this file only adds what a publication needs: article cards, the article reading layout
   and typography for the markdown content. Uses the kit's tokens (--text, --muted, --line,
   --surface, --card, --accent) so it follows the design. */

/* ---- Header: language switcher ---- */
.lang-switch{display:flex;gap:6px}
.lang-switch .hdr-btn{min-width:48px;justify-content:center;font-weight:600}

/* ---- Section headings on the homepage ---- */
.section-title{margin:8px 0 12px;font-size:20px;font-weight:700}

/* ---- Article cards ---- */
.post-grid{--cols:3}
.post-card{overflow:hidden;display:flex;flex-direction:column}
.post-image{display:block;aspect-ratio:16/9;background:var(--surface);overflow:hidden}
.post-image img{width:100%;height:100%;object-fit:cover;display:block}
.post-body{padding:16px 18px 18px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;flex:1 1 auto}
.post-title{margin:0;font-size:17px;font-weight:600;line-height:1.35}
.app .post-title a{color:var(--text);text-decoration:none}
.app .post-title a:hover{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.post-title a:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:2px}
.post-excerpt{margin:0;font-size:14px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.post-meta{margin:auto 0 0;padding-top:4px;font-size:13px}

/* Featured (latest) article: image beside the text */
.post-card.is-featured{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
.post-card.is-featured .post-image{aspect-ratio:auto;min-height:280px}
.post-card.is-featured .post-body{padding:24px 28px;justify-content:center;gap:10px}
.post-card.is-featured .post-title{font-size:26px;font-weight:700;line-height:1.25}
.post-card.is-featured .post-excerpt{font-size:15px;-webkit-line-clamp:4}
.post-card.is-featured .post-meta{margin-top:4px}

/* ---- Article page ---- */
.article-layout{display:grid;grid-template-columns:minmax(0,820px) minmax(260px,340px);gap:24px;align-items:start}
.article-main{display:flex;flex-direction:column;gap:20px;min-width:0}
.article-aside{display:flex;flex-direction:column;gap:20px;position:sticky;top:24px}
.crumbs a{color:var(--muted)}
.crumbs a:hover{color:var(--text)}
.article-panel{overflow:hidden}
.article-image{margin:0;border-bottom:1px solid var(--line)}
.article-image img{width:100%;max-height:440px;object-fit:cover;display:block}
.article-panel .panel-body{padding:28px 32px}
.aside-list{list-style:none;margin:0;padding:0}
.aside-list li{padding:12px 18px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:2px;font-size:14px}
.aside-list li:first-child{border-top:0}
.app .aside-list a{font-weight:600;line-height:1.35;text-decoration:none}
.app .aside-list a:hover{color:var(--accent);text-decoration:underline}
.aside-list .muted{font-size:12px}
.related-articles .aside-list .muted{font-size:13px;line-height:1.45}

/* ---- Article text (rendered markdown) ---- */
.prose{font-size:16.5px;line-height:1.7;color:var(--text);overflow-wrap:break-word}
.prose > :first-child{margin-top:0}
.prose > :last-child{margin-bottom:0}
.prose p,.prose ul,.prose ol,.prose blockquote,.prose pre,.prose table{margin:0 0 1.1em}
.prose h2,.prose h3,.prose h4{margin:1.8em 0 .5em;line-height:1.3}
.prose h2{font-size:22px;font-weight:700}
.prose h3{font-size:18px;font-weight:600}
.prose h4{font-size:16px;font-weight:600}
.prose ul,.prose ol{padding-left:1.4em}
.prose li{margin-bottom:.35em}
.app .prose a{color:var(--accent);text-decoration:underline;text-underline-offset:2px}
.app .prose a:hover{color:var(--text)}
.prose blockquote{padding:12px 18px;border-left:4px solid var(--accent);background:var(--surface);border-radius:0 8px 8px 0}
.prose blockquote > :last-child{margin-bottom:0}
.prose code{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:.88em;padding:1px 5px;border:1px solid var(--line);border-radius:4px;background:var(--surface)}
.prose pre{padding:16px 18px;background:#0B0B0B;color:#D9D9D9;border-radius:8px;overflow-x:auto;line-height:1.55}
.prose pre code{padding:0;border:0;background:none;color:inherit}
.prose table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:14px}
.prose th,.prose td{padding:10px 14px;border:1px solid var(--line);text-align:left;vertical-align:top}
.prose th{background:var(--surface);font-weight:600}
.prose img{max-width:100%;height:auto;border-radius:8px}
.prose hr{border:0;border-top:1px solid var(--line);margin:2em 0}

/* ---- Small screens ---- */
@media (max-width:1024px){
  .article-layout{grid-template-columns:minmax(0,1fr)}
  .article-aside{position:static}
}
@media (max-width:900px){
  .post-card.is-featured{grid-template-columns:minmax(0,1fr)}
  .post-card.is-featured .post-image{aspect-ratio:16/9;min-height:0}
  .post-card.is-featured .post-body{padding:18px}
  .post-card.is-featured .post-title{font-size:22px}
}
@media (max-width:640px){
  .post-grid{--cols:1}
  .article-panel .panel-body{padding:20px 18px}
  .prose{font-size:16px}
  .lang-switch .hdr-btn{min-width:44px;padding:0 10px}
}

/* ---- Consent banner (includes/analytics.php, assets/js/consent.js) ---- */
.consent{position:fixed;right:20px;bottom:20px;z-index:50;width:min(440px,calc(100% - 32px));padding:18px 20px;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--text);box-shadow:0 12px 32px rgba(17,24,39,.16)}
.consent[hidden]{display:none}
.consent-title{margin:0 0 6px;font-size:16px;font-weight:700}
.consent-text{margin:0 0 14px;font-size:14px;line-height:1.5;color:var(--muted)}
.consent-text a{color:var(--accent)}
.consent-actions{display:flex;gap:8px}
.consent-actions .btn{flex:1 1 0}
@media (max-width:640px){.consent{right:16px;bottom:16px}}
