/* SlateMTA szabályzat – a márka színei és betűi (Montserrat, 800 italic címek). */
@font-face { font-family: M; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/montserrat-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: M; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/montserrat-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: M; font-weight: 500; font-style: italic; font-display: swap; src: url(fonts/montserrat-latin-500-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: M; font-weight: 500; font-style: italic; font-display: swap; src: url(fonts/montserrat-latin-ext-500-italic.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: M; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/montserrat-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: M; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/montserrat-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: M; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/montserrat-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: M; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/montserrat-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: M; font-weight: 800; font-style: italic; font-display: swap; src: url(fonts/montserrat-latin-800-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: M; font-weight: 800; font-style: italic; font-display: swap; src: url(fonts/montserrat-latin-ext-800-italic.woff2) format('woff2'); unicode-range: U+0100-024F; }

:root {
  --bg: #1a1b1f;
  --card: #23272a;
  --line: #33353d;
  --green: #3cb882;
  --green-soft: rgba(60, 184, 130, 0.12);
  --red: #f35a5a;
  --red-soft: rgba(243, 90, 90, 0.1);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.64);
  --dim: rgba(255, 255, 255, 0.42);
  --wrap: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.6 M, 'Segoe UI', system-ui, sans-serif;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.title {
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* ---- felső sáv ---- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(26, 27, 31, 0.86);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s;
}

.top.scrolled {
  border-bottom-color: var(--line);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
}

.brand span {
  font-weight: 800;
  font-style: italic;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 600;
}

.top nav a {
  color: var(--muted);
}

.top nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.top nav a.cta {
  padding: 7px 14px;
  background: var(--green);
  border-radius: 6px;
  color: #06170f;
}

.top nav a.cta:hover {
  filter: brightness(1.08);
}

/* ---- borító ---- */
.hero {
  position: relative;
  margin-top: -64px;
  padding: 220px 0 72px;
  background:
    linear-gradient(180deg, rgba(26, 27, 31, 0.15) 0%, rgba(26, 27, 31, 0.45) 45%, var(--bg) 100%),
    image-set(url(hero-1920.webp) 1x) center 30% / cover no-repeat;
}

.hero .brand {
  margin-bottom: 18px;
}

.hero .brand img {
  width: 48px;
  height: 48px;
}

.hero .brand span {
  font-size: 30px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 9.6vw, 92px);
}

.pill {
  display: inline-block;
  margin-top: 18px;
  padding: 4px 13px;
  background: var(--green);
  border-radius: 6px;
  font-weight: 800;
  font-style: italic;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 22px;
  color: var(--dim);
  font-size: 14px;
  font-weight: 600;
}

/* ---- tartalom ---- */
.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px;
  padding-top: 24px;
  padding-bottom: 80px;
}

.toc {
  position: sticky;
  top: 88px;
  align-self: start;
}

.toc h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}

.toc a b {
  min-width: 22px;
  color: var(--green);
  font-weight: 800;
  font-style: italic;
}

.toc a:hover,
.toc a.active {
  color: var(--text);
  text-decoration: none;
}

.toc a.active {
  border-bottom-color: var(--green);
}

.notice {
  margin: 0 0 40px;
  padding: 16px 20px;
  background: var(--red-soft);
  border-left: 4px solid var(--red);
  border-radius: 6px;
  font-weight: 600;
}

.notice p {
  margin: 0;
}

.notice p + p {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 500;
}

.sec {
  margin-bottom: 52px;
}

.sec > h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 8px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--green);
  font-size: clamp(26px, 4vw, 34px);
}

.sec > h2 b {
  color: var(--green);
  font-size: 0.68em;
}

.sec > p.intro {
  margin: 14px 0 6px;
  color: var(--muted);
}

.rule {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
  transition: background 0.4s;
}

.rule:last-child {
  border-bottom: 0;
}

.rule:target,
.rule.flash {
  margin: 0 -14px;
  padding-left: 14px;
  padding-right: 14px;
  background: var(--green-soft);
  border-radius: 6px;
}

.rule .n {
  align-self: start;
  padding: 0;
  background: none;
  border: 0;
  color: var(--green);
  font: 800 italic 17px/1.6 M, 'Segoe UI', sans-serif;
  text-align: left;
  cursor: pointer;
}

.rule .n:hover {
  text-decoration: underline;
}

.rule .t strong {
  font-weight: 700;
}

.rule .t > span {
  color: var(--muted);
}

.rule .note {
  display: block;
  margin-top: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-style: italic;
  font-size: 15px;
}

.rule .penalty {
  display: flex;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 9px;
  padding: 3px 10px;
  background: var(--red-soft);
  border-radius: 5px;
  color: #ff8f8f;
  font-size: 13.5px;
  font-weight: 600;
}

.rule .penalty b {
  color: var(--red);
  font-weight: 700;
}

.closing {
  padding: 22px 26px;
  background: var(--card);
  border-left: 4px solid var(--green);
  border-radius: 6px;
  color: var(--muted);
}

.closing p {
  margin: 0;
}

.closing p + p {
  margin-top: 8px;
}

.closing strong {
  color: var(--text);
}

/* ---- lábléc ---- */
.foot {
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 14px;
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.foot a {
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  padding: 10px 18px;
  background: var(--card);
  border: 1px solid var(--green);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-size: 14px;
  font-weight: 600;
  max-width: calc(100vw - 32px);
  overflow-wrap: anywhere;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 25;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
  cursor: pointer;
}

.to-top.show {
  opacity: 1;
  visibility: visible;
}

.to-top:hover {
  border-color: var(--green);
}

/* ---- mobil ---- */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .toc {
    position: static;
    margin-bottom: 28px;
  }

  .top nav a:not(.cta) {
    display: none;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 16px;
  }

  .hero {
    padding: 150px 0 44px;
    background-image:
      linear-gradient(180deg, rgba(26, 27, 31, 0.15) 0%, rgba(26, 27, 31, 0.5) 45%, var(--bg) 100%),
      url(hero-960.webp);
  }

  .hero .brand span {
    font-size: 24px;
  }

  .hero .brand img {
    width: 40px;
    height: 40px;
  }

  .lead {
    font-size: 16px;
  }

  .rule {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .top .brand span {
    font-size: 18px;
  }
}

/* ---- nyomtatás ---- */
@media print {
  .top,
  .toc,
  .toast,
  .to-top,
  .foot {
    display: none;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .layout {
    display: block;
  }

  .rule,
  .closing {
    break-inside: avoid;
  }
}

/* ---- szerverszabályzat: alapfogalmak, záró megjegyzés ---- */
.gl {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 0 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}

.gl:last-child {
  border-bottom: 0;
}

.gl .k {
  color: var(--green);
  font-weight: 800;
  font-style: italic;
  font-size: 21px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.gl .k small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0;
}

.gl .d strong {
  font-weight: 700;
}

.gl .d span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: italic;
}

.sec > p.outro {
  margin: 14px 0 0;
  padding: 12px 16px;
  background: var(--card);
  border-radius: 6px;
  color: var(--muted);
  font-size: 15px;
}

/* Hosszú tartalomjegyzék: saját görgetés a sávban. */
.toc ol {
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.top nav a.current {
  color: var(--text);
}

.meta a {
  color: var(--green);
}

/* ---- kezdőlap ---- */
.index-list {
  padding-top: 8px;
  padding-bottom: 96px;
}

.index-list ol {
  max-width: 560px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.index-list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
  font-style: italic;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.index-list a b {
  color: var(--green);
  font-size: 0.68em;
}

.index-list a:hover {
  border-bottom-color: var(--green);
  text-decoration: none;
}

@media (max-width: 900px) {
  .toc ol {
    max-height: none;
  }
}

@media (max-width: 560px) {
  .gl {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .gl .k small {
    display: inline;
    margin-left: 8px;
  }
}
