/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons+Outlined');

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== DARK THEME (default) ===== */
:root {
  --bg:           #09090e;
  --surface:      #111118;
  --border:       #1e1e2a;
  --text:         #c4c4d0;
  --muted:        #5a5a70;
  --heading:      #e8e8f4;
  --heading-sub:  #b0b0c4;
  --strong:       #dcdce8;
  --accent:       #c8a84b;
  --accent2:      #7eb8d4;
  --accent-fg:    #09090e;
  --current:      #e0554a;
  --current-fg:   #fff5f3;

  --serif:  'Lora', Georgia, serif;
  --mono:   'JetBrains Mono', 'Courier New', monospace;
  --max-w:  720px;
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --bg:           #f7f5f0;
  --surface:      #edeae3;
  --border:       #d8d4cb;
  --text:         #2c2c38;
  --muted:        #7a7a8a;
  --heading:      #18181f;
  --heading-sub:  #444455;
  --strong:       #1a1a28;
  --accent:       #9a6f1a;
  --accent2:      #2a6a8a;
  --accent-fg:    #f7f5f0;
  --current:      #c0392b;
  --current-fg:   #fff5f3;
}

/* ===== BASE ===== */
html { font-size: 17px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.2s, color 0.2s;
}

/* ===== LAYOUT ===== */
header, main, footer {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { flex: 1; padding-top: 3rem; padding-bottom: 4rem; }

/* ===== NAV ===== */
header { padding-top: 1.25rem; padding-bottom: 1.25rem; }

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: 1.25rem;
}
.home-link:hover { opacity: 0.75; }
.nav-logo { height: 2rem; }
.home-text {
  font-family: var(--mono);
  font-size: 1.35rem;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-left: 0.4rem;
}
.home-text sup { font-size: 0.72em; }
.home-motto {
  font-size: 0.55em;
  opacity: 0.55;
  margin-left: 0.15em;
  letter-spacing: 0;
  vertical-align: sub;
}
.home-motto sup { font-size: 0.9em; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links { display: flex; gap: 1.25rem; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-family: var(--mono);
  letter-spacing: 0.03em;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s, background 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.theme-toggle .material-icons-outlined {
  font-size: 18px;
}

/* ===== FOOTER ===== */
footer {
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-family: var(--mono);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-sig {
  white-space: nowrap;
}

.footer-menu {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.footer-menu-label {
  color: var(--muted);
  opacity: 0.6;
  font-style: italic;
}

.footer-menu a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-menu a:hover {
  color: var(--accent);
}

/* ===== TALES ===== */
.tales-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tales-preview {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.tales-preview:first-child {
  border-top: 1px solid var(--border);
}

.tales-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.5;
  min-width: 1.5rem;
  flex-shrink: 0;
}

.tales-body h2 {
  font-size: 1rem;
  color: var(--heading-sub);
  margin-bottom: 0.15rem;
}

.tales-body h2 a {
  color: inherit;
  text-decoration: none;
}

.tales-body h2 a:hover {
  color: var(--accent);
}

.tales-level {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.6;
  margin: 0;
}

.tales-level-tag {
  font-style: italic;
}

.tales-full .tales-text p {
  margin-bottom: 1.2rem;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; font-family: var(--serif); }

h1 { font-size: 2rem;   color: var(--heading);     margin-bottom: 1rem; }
h2 { font-size: 1.25rem; color: var(--heading-sub); margin-bottom: 0.5rem; font-weight: 400; }
h3 { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; font-family: var(--mono); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono {
  font-family: var(--mono);
  color: var(--accent2);
  font-size: 0.93em;
}
.mono sup { font-size: 0.75em; }

.accent { color: var(--accent); }
em { font-style: italic; color: var(--strong); }

/* ===== HOMEPAGE ===== */
.hypothesis {
  padding: 3rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.theory-name {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--heading);
  margin-bottom: 0.6rem;
  font-style: italic;
}
.theory-name-abbr {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-left: 0.25rem;
  letter-spacing: 0.08em;
}
.theory-subtitle {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: -0.35rem;
  margin-bottom: 0.6rem;
}
.theory-subtitle-symbol {
  color: var(--accent2);
  font-size: 1.05em;
}
.theory-subtitle-abbr {
  color: var(--accent2);
  margin-left: 0.2rem;
  letter-spacing: 0.06em;
}

.overline {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hypothesis h1 {
  font-size: 2.3rem;
  color: var(--heading);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.subhypothesis {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.75;
}

.theory-summary {
  padding: 1.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.theory-summary p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
}
.theory-link { margin-top: 1rem; }
.theory-link a { font-size: 0.9rem; }

.ask-section {
  padding: 0 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.ask-section h3 { margin-bottom: 0.4rem; }
.ask-subtitle { font-size: 0.88rem; color: var(--muted); margin-bottom: 1.25rem; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.see-all { font-size: 0.85rem; color: var(--muted); font-family: var(--mono); }
.see-all:hover { color: var(--accent); text-decoration: none; }

/* ===== ENTRIES ===== */
.entry-preview {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.entry-preview:last-child { border-bottom: none; }

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 0.4rem;
  column-gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.entry-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.1em 0.5em;
  border-radius: 2px;
  opacity: 0.75;
}

.iteration {
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--muted);
}

.entry-preview h2 { font-size: 1.08rem; margin-bottom: 0.35rem; color: var(--heading-sub); }
.entry-preview h2 a { color: var(--heading-sub); }
.entry-preview h2 a:hover { color: var(--accent); text-decoration: none; }

.entry-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.empty { color: var(--muted); font-style: italic; }

/* ===== ENTRY FULL ===== */
.entry-full h1 {
  font-size: 1.7rem;
  margin-bottom: 2rem;
  color: var(--heading);
}

.entry-meta-full {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.entry-meta-full summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
}
.entry-meta-full > *:not(summary) { margin-top: 0.75rem; }
.entry-meta-full p { margin-bottom: 0.6rem; }

.entry-body { margin-bottom: 2.5rem; }

.entry-body h1,
.entry-body h2,
.entry-body h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.entry-body h2 { font-size: 1.12rem; color: var(--heading-sub); }
.entry-body h3 { font-size: 0.78rem; }
.entry-body p  { margin-bottom: 1.1rem; }
.entry-body ul, .entry-body ol { padding-left: 1.5rem; margin-bottom: 1.1rem; }
.entry-body li { margin-bottom: 0.3rem; }

.entry-body code {
  font-family: var(--mono);
  font-size: 0.87em;
  color: var(--accent2);
  background: var(--surface);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

.entry-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.entry-body pre code {
  background: none;
  padding: 0;
  font-size: 0.83rem;
  color: var(--text);
}

.entry-body blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1.1rem;
}

.entry-body strong { color: var(--strong); font-weight: 600; }
.entry-body em { font-style: italic; }

.entry-body a {
  color: var(--accent2);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity .15s;
}
.entry-body a:hover { opacity: .75; }

.entry-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.entry-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}
.entry-body th, .entry-body td {
  text-align: left;
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--border);
}
.entry-body th {
  color: var(--heading-sub);
  font-weight: 600;
  border-bottom-width: 2px;
}
.entry-body tr:last-child td { border-bottom: none; }

.entry-body img {
  max-width: 100%;
  border-radius: 4px;
  margin: 1rem 0;
}

.entry-body h4 {
  font-size: .95rem;
  color: var(--heading-sub);
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}

.entry-body ul ul, .entry-body ol ul, .entry-body ul ol, .entry-body ol ol {
  margin-bottom: 0;
  margin-top: .2rem;
}

/* Research categories */
.research-category { margin-bottom: 1.5rem; }
.category-heading {
  font-size: .75rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent2);
  border-bottom: 1px solid var(--border);
  padding-bottom: .4rem;
  margin-bottom: 1rem;
  margin-top: 2rem;
}
.category-heading:first-child { margin-top: 0; }

.open-questions {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}
.open-questions h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.open-questions ul { padding-left: 1.25rem; }
.open-questions li { color: var(--muted); font-size: 0.93rem; margin-bottom: 0.25rem; }

.entry-nav {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.entry-nav a { font-size: 0.88rem; color: var(--muted); font-family: var(--mono); }
.entry-nav a:hover { color: var(--text); text-decoration: none; }
.entry-nav-siblings { display: flex; gap: 1.5rem; }

/* ===== PAGE HEADER ===== */
.page-header {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: 0.5rem; }
.page-header p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* ===== ENTRY SEARCH (vyzkum/archive filter) ===== */
.entry-search-wrap { margin-bottom: 1.75rem; }
.entry-search {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.55rem 0.8rem;
}
.entry-search:focus { outline: none; border-color: var(--accent); }
.entry-search::placeholder { color: var(--muted); }
.entry-search-count {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ===== ABOUT ===== */
.about section { margin-bottom: 2.5rem; }
.about h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.75rem;
  font-family: var(--mono);
  font-weight: 500;
}
.about p { font-size: 0.95rem; }
.about .tag { margin-right: 0.4rem; }

/* ===== ASK FORM ===== */
.ask-section { margin-bottom: 2.5rem; }

.ask-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.ask-input {
  padding: 0.65rem 1rem;
}
.ask-input textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--serif);
  font-size: 0.97rem;
  line-height: 1.55;
  resize: none;
  display: block;
  overflow: hidden;
}
.ask-input textarea::placeholder { color: var(--muted); }

.ask-details {
  border-top: 1px solid var(--border);
  padding: 0.65rem 1rem;
  display: none;
  flex-direction: column;
  gap: 0.6rem;
}
.ask-details.visible { display: flex; }

.ask-details-meta {
  display: flex;
  gap: 0.75rem;
}
.ask-details-meta input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.85rem;
  padding: 0.2rem 0;
  min-width: 0;
}
.ask-details-meta input::placeholder { color: var(--muted); opacity: 0.6; }
.ask-details-meta input:focus { border-color: var(--accent); color: var(--text); }

.ask-details-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ask-details-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.qform-photo-preview {
  position: relative;
  display: inline-block;
}
.qform-photo-preview img {
  max-height: 120px;
  max-width: 100%;
  border-radius: 4px;
  display: block;
}
.qform-photo-remove {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px; height: 22px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}
.qform-photo-btn {
  display: flex;
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
}
.qform-photo-btn:hover { color: var(--accent); }
.qform-photo-btn input { display: none; }
.qform-photo-btn .material-icons-outlined { font-size: 20px; }

.qform-submit {
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  padding: 0.5em 1.35em;
  border-radius: 4px;
  font-size: 0.88rem;
  font-family: var(--mono);
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.qform-submit:hover { opacity: 0.85; }

/* ===== QUESTION CARDS ===== */
.questions-list { display: flex; flex-direction: column; gap: 1.5rem; }

.question-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  background: var(--surface);
}

.q-meta { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.q-date { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }
.q-nick { font-family: var(--mono); font-size: 0.76rem; color: var(--accent); }

.q-text {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.q-photo { margin-bottom: 1rem; }
.q-photo img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 6px;
  display: block;
}

.q-response {
  background: var(--bg);
  border-left: 2px solid var(--accent);
  padding: 0.85rem 1rem;
  border-radius: 0 4px 4px 0;
  margin-top: 0.75rem;
}
.q-response-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.q-response-body { font-size: 0.95rem; line-height: 1.65; }
.q-response-body p { margin-bottom: 0.6rem; }
.q-response-body p:last-child { margin-bottom: 0; }

.q-pending {
  margin-top: 0.75rem;
  font-size: 0.83rem;
  color: var(--muted);
  font-style: italic;
  font-family: var(--mono);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .hypothesis h1 { font-size: 1.8rem; }
  h1 { font-size: 1.6rem; }
  .qform-inline { flex-direction: column; align-items: flex-start; }
}

/* ===== NAV BURGER ===== */
.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 38px;
  height: 34px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--muted);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-burger:hover span { background: var(--accent); }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-burger { display: flex; }
  nav { position: relative; flex-wrap: wrap; }
  .nav-right {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 1rem 0 0.5rem;
    border-top: 1px solid var(--border);
  }
  nav.nav-open .nav-right { display: flex; }
  .nav-links {
    flex-direction: column;
    gap: 0.85rem;
  }
  .nav-links a { font-size: 1rem; padding: 0.25rem 0; }
  .lang-toggle { justify-content: flex-start; margin-right: 0; }
  .theme-toggle { align-self: flex-start; }
}

/* ===== LANG TOGGLE ===== */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-right: 0.5rem;
}
.lang-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
  padding: 0.15em 0.3em;
  border-radius: 3px;
  transition: color 0.15s;
}
.lang-btn:hover { color: var(--accent); }
.lang-active { color: var(--accent) !important; cursor: default; }
.lang-sep { color: var(--border); font-family: var(--mono); font-size: 0.72rem; }

/* ===== HERO SECTION ===== */
.hero {
  padding: 3.5rem 0 2rem;
  text-align: center;
}
.hero-headline {
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--heading);
  margin: 0.5rem 0 1rem;
}
@media (max-width: 600px) {
  .hero-headline { font-size: 1.75rem; }
}

/* ===== CONTENT BODY ===== */
.content-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem 3rem;
}
.content-body h2 {
  font-size: 1.4rem;
  color: var(--heading);
  margin: 2rem 0 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
}
.content-body h3 {
  font-size: 1.1rem;
  color: var(--heading-sub);
  margin: 1.5rem 0 0.5rem;
}
.content-body p { margin-bottom: 1rem; }
.content-body ul, .content-body ol {
  margin: 0.5rem 0 1rem 1.5rem;
}
.content-body li { margin-bottom: 0.3rem; }
.content-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  color: var(--muted);
  font-style: italic;
}
.content-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
.content-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}
.content-body pre code {
  background: none;
  padding: 0;
}
.content-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.content-body a { color: var(--accent); }
.content-body a:hover { opacity: 0.8; }

/* Theory: math display */
.theory-body .MathJax { overflow-x: auto; }

/* Popular: reading view — slightly wider line, serif emphasis */
.reading-view {
  font-size: 1.08rem;
  line-height: 1.85;
}
.reading-view h1 { font-size: 2rem; }

/* ===== NAV CARDS ===== */
.nav-cards {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem 3rem;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr; }
}
.nav-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.nav-card:hover {
  border-color: var(--accent);
  background: var(--bg);
}
.nav-card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-family: var(--serif);
}
.nav-card h3 {
  font-size: 1rem;
  color: var(--heading);
  margin: 0 0 0.35rem;
}
.nav-card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ===== SPLASH (6 angles) ===== */
.splash-hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}
.splash-headline {
  font-size: 2rem;
  color: var(--heading);
  line-height: 1.2;
  margin: 0.5rem 0 0.75rem;
  font-weight: 600;
}
.splash-sub {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 36rem;
  margin: 0 auto;
}
.splash-hero .theory-name {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}
.splash-disclaimer,
.page-disclaimer {
  max-width: 38rem;
  margin: 2.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
  line-height: 1.5;
}

.splash-form {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

/* Quincunx: 5 cards, 2 top, 1 center, 2 bottom.
   Center card is the semantic pivot (active interest).
   DOM order: top-left, top-right, center, bot-left, bot-right. */
.splash-hex {
  position: relative;
  width: 100%;
  max-width: 620px;
  aspect-ratio: 1 / 1;
  margin: 2rem auto 0;
}
.splash-hex .nav-card {
  position: absolute;
  width: 34%;
  min-height: 7.5rem;
  transform: translate(-50%, -50%);
  padding: 0.95rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.splash-hex .nav-card:nth-child(1) { left: 25%; top: 22%; }  /* top-left   */
.splash-hex .nav-card:nth-child(2) { left: 75%; top: 22%; }  /* top-right  */
.splash-hex .nav-card:nth-child(3) { left: 50%; top: 50%; }  /* center     */
.splash-hex .nav-card:nth-child(4) { left: 25%; top: 78%; }  /* bot-left   */
.splash-hex .nav-card:nth-child(5) { left: 75%; top: 78%; }  /* bot-right  */

.splash-hex .nav-card h3 { font-size: 0.92rem; }
.splash-hex .nav-card p  { font-size: 0.78rem; line-height: 1.4; }
.splash-hex .nav-card-icon { font-size: 1.45rem; margin-bottom: 0.3rem; }

@media (max-width: 620px) {
  .splash-hex {
    aspect-ratio: auto;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 1.5rem;
  }
  .splash-hex .nav-card {
    position: static;
    transform: none;
    width: 100%;
    min-height: 0;
  }
}

.nav-card--persona {
  font-family: var(--serif);
  text-align: left;
  color: inherit;
  cursor: pointer;
  width: 100%;
  font-size: inherit;
}
.nav-card--persona:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.splash-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.75rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.splash-remember input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
}
.splash-remember:hover { color: var(--text); }

/* ===== UHEL LANDING FOOTER ===== */
.uhel-footer {
  max-width: var(--max-w);
  margin: 2.5rem auto 0;
  padding: 1.5rem 1rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.uhel-change {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.uhel-change:hover { color: var(--accent); text-decoration: none; }

/* ===== NAV ANGLE INDICATOR ===== */
.nav-angle {
  color: var(--accent) !important;
  font-size: 0.78rem !important;
  opacity: 0.8;
}
.nav-angle:hover { opacity: 1; }

/* ===== PAGE HEADER ===== */
.page-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1rem 1.5rem;
}
.page-header h1 {
  font-size: 2rem;
  color: var(--heading);
  margin-bottom: 0.4rem;
}
.page-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== PAPER DOWNLOADS ===== */
.paper-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 2.5rem;
}
.paper-dl {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 6px;
  min-width: 14rem;
  flex: 1 1 14rem;
  transition: border-color 0.15s ease;
}
.paper-dl:hover { border-color: var(--accent); text-decoration: none; }
.paper-dl .paper-dl-title {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.paper-dl .paper-dl-meta {
  color: var(--muted);
  font-size: 0.78rem;
}
.splash-downloads {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin: 0.5rem 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}
.splash-downloads a { color: var(--accent); }
.splash-downloads .sep { color: var(--muted); }

/* ===== PAPERS PAGE ===== */
.paper-section-heading {
  font-size: 1.1rem;
  color: var(--heading-sub);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.paper-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.paper-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
}
.paper-card-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--heading);
  margin-bottom: 0.4rem;
}
.paper-current .paper-card-title { padding-right: 5.5rem; }
.paper-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.paper-card-version { color: var(--accent2); font-weight: 600; }
.paper-card-superseded {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
}
.paper-card-note {
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.8rem;
  line-height: 1.5;
}
.paper-card-files {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* current paper — red accent */
.paper-card.paper-current {
  border-color: var(--current);
  box-shadow: 0 0 0 1px var(--current), 0 4px 24px -8px var(--current);
  padding-top: 2.2rem;
}
.paper-card-badge {
  position: absolute;
  top: 0.9rem;
  right: 1.3rem;
  background: var(--current);
  color: var(--current-fg);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}
.paper-dl-current {
  border-left-color: var(--current);
}
.paper-dl-current .paper-dl-title { color: var(--current); }
.paper-dl-current:hover { border-color: var(--current); }

/* odkaz na výzkum nad branami (splash) */
.splash-research-link {
  text-align: center;
  margin: 1.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.splash-research-link a { color: var(--accent); text-decoration: none; }
.splash-research-link a:hover { text-decoration: underline; }
