
:root {
  /* Colors */
  --black: #000000;
  --white: #ffffff;
  --red: #e63739;
  --orange: #ff8a00;
  --green: #45af42;
  
  --hr: rgba(255, 255, 255, 0.65);
  
  /* Component colors */
  --bg-contact: rgba(52, 231, 2, 0.20);
  --bg-card: #161212;
  --bg-content: #161212;
  
  /* Spacing */
  --r4: 4px;
  --r8: 8px;
  --gap: 12px;
  
  /* Typography */
  --font-system: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  
  font-family: var(--font-system);
}


html, body {
  height: 100%;
  margin: 0;
  background: var(--black);
  color: var(--white);
}

* {
  box-sizing: border-box;
}

.site {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  gap: var(--gap);
  text-align: center;
}

.site-header {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
}

.logo {
  display: block;
  margin: 0 auto;
  width: 35vw;
  height: auto;
}

.header-controls {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap);
}

.btn,
.lang-popup select {
  padding: 6px;
  margin-top: 32px;
  border-radius: var(--r4);
  font-size: 14px;
  border: none;
  color: var(--white);
}

.btn {
  background: var(--bg-contact);
}

.lang-popup select {
  background: transparent;
}

.content-block {
  width: 100%;
  max-width: 1100px;
  background: var(--bg-content);
  border-radius: var(--r8);
  padding: 20px;
  margin: 16px 0 32px 0;
}

.page-content {
  text-align: justify;
  font-family: var(--font-system);
  color: var(--white);
}

.page-content ul {
  padding-left: 20px;
  margin: 6px 0;
}

.page-content li {
  margin-bottom: 6px;
}

.nav-row {
  width: 100%;
  max-width: 1100px;
  margin-top: 24px;
}

.nav-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: 0;
  margin: 0;
}

/*
.nav-name-btn {
  height: 16px;
  line-height: 16px;
  min-width: 80px;
  padding: 0 8px;
  border-radius: var(--r4);
  border: none;
  background: rgba(0, 0, 0, 0.9);
  color: var(--orange);
  font-size: 12px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  outline: 2px solid rgba(255, 138, 0, 0.25);
  outline-offset: 2px;
}
*/

.nav-name-btn {
  height: 16px;
  line-height: 16px;
  min-width: 80px;
  padding: 0 8px;
  border-radius: var(--r4);
  border: none;
  background: rgba(0, 0, 0, 0.9);
  color: var(--orange);
  font-size: 12px;
  cursor: pointer;
  /* REMOVE: overflow: hidden; */
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  outline: 2px solid rgba(255, 138, 0, 0.25);
  outline-offset: 2px;
}



.nav-name-btn:disabled {
  cursor: not-allowed;
  color: rgba(255, 138, 0, 0.5);
}

.nav-name-btn:focus {
  outline: 2px solid rgba(255, 138, 0, 0.25);
  outline-offset: 2px;
}

.nav-spacer {
  flex: 1;
}

.card-block {
  width: 100%;
  max-width: 1100px;
}

/* ===== DYNAMIC CARD STYLING ===== */

.card {

  border-radius: var(--r8);
  padding: 16px;
  margin-top: 8px;
  min-height: 80px;
  font-size: 15px;
  color: var(--white);
  text-align: left;
  font-family: var(--font-system);
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.5;
}

/* Remove pre-wrap to allow normal text flow */
.card,
.card * {
  white-space: normal;
  background: var(--bg-card);
}

/* ===== CARD HEADING STYLES ===== */

.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6 {
  color: var(--orange);
  margin: 12px 0 8px 0;
  padding: 0;
  font-weight: bold;
  line-height: 1.3;
}

.card h1:first-child,
.card h2:first-child,
.card h3:first-child,
.card h4:first-child,
.card h5:first-child,
.card h6:first-child {
  margin-top: 0;
}

.card h1 {
  font-size: 1.8em;
}

.card h2 {
  font-size: 1.5em;
}

.card h3 {
  font-size: 1.2em;
}

.card h4 {
  font-size: 1.1em;
}

.card h5 {
  font-size: 1em;
}

.card h6 {
  font-size: 0.95em;
}

/* ===== CARD PARAGRAPH STYLES ===== */

.card p {
  margin: 0 0 12px 0;
  padding: 0;
  line-height: 1.5;
}

.card p:last-child {
  margin-bottom: 0;
}

.card h1 + p,
.card h2 + p,
.card h3 + p,
.card h4 + p,
.card h5 + p,
.card h6 + p {
  margin-top: 0;
}

/* ===== CARD BR TAGS ===== */

.card br {
  display: none;
}

/* ===== CARD LIST STYLES ===== */

.card ul,
.card ol {
  margin: 8px 0 12px 0;
  padding-left: 20px;
}

.card li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.card li:last-child {
  margin-bottom: 0;
}

/* ===== CARD STRONG & EM ===== */

.card strong {
  font-weight: bold;
}

.card em {
  font-style: italic;
}

.card strong em,
.card em strong {
  font-weight: bold;
  font-style: italic;
}

/* ===== CARD PRE STYLES ===== */

.card pre {
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--r4);
  overflow-x: auto;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.4;
}

.card pre:last-child {
  margin-bottom: 0;
}

#baseline_0,
#baseline {
  display: inline-block;
  visibility: visible;
  pointer-events: auto;
  background: transparent;
  color: var(--green);
  font-family: var(--font-system);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

#baseline_0 {
  margin-top: 32px;
}

#baseline {
  width: 100%;
  max-width: 1100px;
  margin-top: 12px;
}

.hard-footer {
  width: 100%;
  max-width: 1100px;
  margin-top: 20px;
  font-size: 13px;
  text-align: center;
}

/* ===== GLOBAL HEADING STYLES ===== */

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  color: var(--red);
  font-weight: bold;
  line-height: 1.3;
}

h1 {
  font-size: 1.8em;
  margin-bottom: 0.4em;
}

h2 {
  font-size: 1.5em;
  margin-bottom: 0.3em;
  margin-top: 0.5em;
}

h3 {
  font-size: 1.2em;
  margin-bottom: 0.2em;
  margin-top: 0.3em;
}

h4 {
  font-size: 1.1em;
  margin-bottom: 0.15em;
}

h5 {
  font-size: 1em;
  margin-bottom: 0.1em;
}

h6 {
  font-size: 0.95em;
  margin-bottom: 0.1em;
}

/* ===== PARAGRAPH & TEXT ===== */

p {
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

p + p,
p + h2,
p + h3,
h2 + p,
h3 + p {
  margin-top: 0.8em;
}

ul, ol {
  margin: 0.5em 0;
  padding-left: 20px;
}

li {
  margin-bottom: 0.4em;
  line-height: 1.5;
}

strong {
  font-weight: bold;
}

em {
  font-style: italic;
}

strong em,
em strong {
  font-weight: bold;
  font-style: italic;
}

del {
  text-decoration: line-through;
  opacity: 0.7;
}

hr {
  margin: 1em 0;
  border: none;
  border-top: 1px solid var(--hr);
}

/* ===== RESPONSIVE ===== */
.swipe-hint {
  display: none;
  font-size: 10px;
  margin-top: 0px;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .nav-name-btn {
    height: auto;
    line-height: normal;
    white-space: normal;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0px;
  }

  .swipe-hint {
    display: block;
  }

  .page-content {
    font-size: 15px;
  }

  .nav-name-btn {
    min-width: 64px;
    font-size: 12px;
  }

  .logo {
    width: 65vw;
  }

  #baseline_0 {
    font-size: 15px;
  }

  .card {
    padding: 12px;
    font-size: 14px;
  }

  .card h1 {
    font-size: 1.6em;
  }

  .card h2 {
    font-size: 1.3em;
  }

  .card h3 {
    font-size: 1.1em;
  }

  .card h4 {
    font-size: 1em;
  }

  .card h5 {
    font-size: 0.95em;
  }
}

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
