/* ===============================
  Tokens
=============================== */

:root {
  --color-bg: #f5f5f7;
  --color-surface: #ffffff;
  --color-text: #263785;
  --jb-muted: #6b7280;
  --jb-border: #e5e7eb;
  --color-accent: #D4AF37;;
  --jb-code-bg: #f3f4f6;
  --radius: 12px;
  --box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  --font-body: "Segoe UI", sans-serif;
}

/* ===============================
  Base
=============================== */

html,
body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  margin: 0;
  padding: 0;
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Optional safety rail if you still see rare sideways scrolling.
   Enable if needed.
*/
/*
html,
body {
  overflow-x: hidden;
}
*/

/* ===============================
  Layout
=============================== */

main.publish {
  max-width: 840px;
  margin: 3.5rem auto 2rem;
  padding: 2.5rem 2.75rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  /* box-shadow: var(--box-shadow); */
  border: 3px solid #D4AF37;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  main.publish {
    margin: 1.25rem auto 1.5rem;
    padding: 1.25rem 1.25rem;
  }
}

/* ===============================
  Typography
=============================== */

main.publish :where(h1, h2, h3, h4, h5, h6) {
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

main.publish h1 {
  font-size: 2.25rem;
  margin-top: 0;
}

main.publish h2 {
  font-size: 1.75rem;
}

main.publish h3 {
  font-size: 1.4rem;
}

main.publish h4 {
  font-size: 1.15rem;
}

main.publish h5 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

main.publish h6 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--jb-muted);
}

main.publish p {
  margin: 0.5rem 0 1rem;
  line-height: 1.7;
  font-size: 1rem;
}

main.publish strong {
  font-weight: 600;
}

main.publish em {
  font-style: italic;
}

/* ===============================
  Links + long content wrapping
=============================== */

main.publish a {
  color: var(--color-accent);
  text-decoration: none;

  /* Prevent long URLs from blowing up mobile layout */
  overflow-wrap: anywhere;
  word-break: break-word;
}

main.publish a:hover {
  border-bottom: 1px solid var(--color-accent);
}

/* Make sure footnotes and general text also wrap long tokens */
main.publish :where(p, li, .footnotes, .footnotes a) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ===============================
  Lists
=============================== */

main.publish ul,
main.publish ol {
  margin: 0.5rem 0 1.25rem;
  padding-left: 1.5rem;
}

main.publish li {
  margin: 0.25rem 0;
  line-height: 1.6;
}

main.publish :where(ul ul, ol ol, ul ol, ol ul) {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

/* Tighter list item spacing - remove paragraph margins inside list items */
main.publish li > p {
  margin-top: 0;
  margin-bottom: 0;
}

/* Task lists (checkboxes) - hide bullets and align with other list items */
main.publish li.task-list-item {
  list-style-type: none;
  margin-left: -1.5em;
}

main.publish .task-list-item-checkbox {
  margin-right: 0.5em;
}

/* ===============================
  Rules
=============================== */

main.publish hr {
  border: 0;
  border-top: 1px solid var(--jb-border);
  margin: 2rem 0;
}

/* ===============================
  Blockquotes
=============================== */

main.publish blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--color-accent);
  background: #fffcef;
  color: #332e1f;
  border-radius: 0 10px 10px 0;
}

main.comments blockquote {
  text-align: center;
}

/* ===============================
  Images
=============================== */

main.publish img {
  max-width: 85%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;        /* kitölti a téglalapot, levágja a széleket */
  object-position: bottom;
  display: block;
  margin: 1.25rem auto;
  border-radius: 8px;
}