/* The site's own layer on top of the vendored frontend stylesheets, which are never
   edited (burza_dev/static/frontend, scripts/vendor_frontend.py). Loaded after them. */

/* Without scripting the menu toggle cannot open the menu, so the header shows it. */
@media (max-width: 860px) and (scripting: none) {
  .site-header { position: relative; flex-wrap: wrap; background: var(--bg); }
  .menu-toggle { display: none; }
  .site-header:not([data-menu-open]) .site-menu,
  .site-menu { display: flex; position: static; flex: 1 0 100%; max-height: none; overflow: visible; padding: 0 0 var(--space-4); }
}

.staff-nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font: 500 .8125rem/1.4 var(--font-mono); letter-spacing: .06em; }
.staff-nav a { color: var(--muted); text-decoration: none; }
.staff-nav a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 860px) { .staff-nav { flex-direction: column; } }

.error-view { padding-top: calc(var(--header-bottom, 72px) + var(--space-7)); text-align: center; }

/* Home */
.service-card { position: relative; }

/* Article list and article */
.post-card-title a { color: inherit; text-decoration: none; }
.post-card-title a:hover { color: var(--accent-strong); }
.load-more { margin-top: var(--space-6); text-align: center; }
/* The header is fixed, so the article starts below it (the design's #article-view does the same). */
.blog-article { padding-top: calc(var(--header-bottom, 72px) + var(--space-6)); }
.article-body { overflow-wrap: anywhere; }
.article-body > * + * { margin-top: 1.1em; }
.article-body :is(h2, h3, h4) { margin-top: 1.8em; }
.article-body :is(ul, ol) { padding-left: 1.4em; }
.article-body pre { overflow-x: auto; padding: var(--space-4); background: var(--surface-raised); border: 1px solid var(--line); }
.article-body code { font-family: var(--font-mono); font-size: .9em; }
.article-body :is(table) { display: block; max-width: 100%; overflow-x: auto; }
.table-of-contents a.toc-sub { grid-template-columns: minmax(0, 1fr); padding-left: calc(var(--space-2) + 1.75rem + var(--space-2)); }

/* Comments */
.comments-section > h2 { margin-bottom: var(--space-5); font-size: var(--step-3); font-weight: 400; }
.comment { display: grid; gap: var(--space-2); margin-bottom: var(--space-5); padding: var(--space-4); background: var(--glass); border: 1px solid var(--glass-edge); }
.comment-reply { margin-left: var(--space-5); }
.comment-context, .comment-pending, .comment-none { color: var(--muted); font-size: .875rem; }
.comment-body { overflow-wrap: anywhere; }
.comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.reaction-form { display: inline-block; margin: 0; }
.status-pending { background: #5c4a14; }
.status-spam { background: #6a2a2a; }
.status-deleted { background: #2f3b4d; }

/* Forms: Django renders the widgets, the vendored .field rule styles them. */
.field label:not(.field-label) { color: var(--ink); font-size: .9375rem; font-weight: 600; }
.field-check { grid-template-columns: auto 1fr; align-items: center; }
.field-check input { width: auto; min-height: 0; }
.field .errorlist, .contact-form .errorlist { margin: 0; padding: 0; list-style: none; color: var(--danger); font-size: .875rem; font-weight: 600; }
.captcha-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.captcha-row .captcha-part:last-child { flex: 1 1 12rem; }
.captcha { border: 1px solid var(--glass-edge); }
.contact-form .notice { margin: 0; }

/* Nothing of a public page is wider than the viewport. A long word breaks (hyphenated where the browser
   has a dictionary for the page language) instead of widening the hero, and the home headline is sized
   so the longest Polish word of home.title fits at 360 px. The vendored 13.5vw cap below 420 px is not
   enough for it. */
.display, .hero-copy { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 520px) { .hero-home .display { font-size: min(var(--step-6), 9vw); } }

/* The compact header: the brand may shrink and the menu toggle never does, so the toggle stays on screen. */
@media (max-width: 860px) {
  .site-header, .brand { min-width: 0; }
  .menu-toggle { flex: none; }
}
