/* Author docs. Shell matches the builder: 56px top bar, 288px left nav, white content. */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: #111827;
  background: #f9fafb;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(46, 49, 224, 0.16); }

:focus-visible {
  outline: 2px solid var(--orbiso-blue);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: inherit;
  line-height: 1.2;
  margin: 0 0 0.55em;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--orbiso-blue); text-decoration: none; }
a:hover { color: var(--orbiso-blue-dark); }

ul, ol { padding-left: 1.2em; margin: 0 0 1em; }

.container {
  width: min(100% - 2rem, 1180px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.65rem 1.1rem;
  background: var(--orbiso-blue);
  color: #fff;
  border-radius: var(--r-pill);
}
.skip-link:focus { top: 0.75rem; color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 1.125rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn-primary { background: #4f46e5; color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.btn-primary:hover { background: #4338ca; color: #fff; }
.btn-secondary {
  background: var(--surface);
  color: var(--orbiso-blue);
  border-color: var(--blue-100);
}
.btn-secondary:hover { background: var(--blue-25); color: var(--orbiso-blue-dark); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-5); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 3.5rem;
  padding: 0 1.25rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  color: #111827;
  text-decoration: none;
}
.logo:hover { color: #111827; }
.logo img.wordmark { width: auto; height: 22px; }
.logo-rule {
  width: 1px;
  height: 1.5rem;
  background: #e5e7eb;
  flex: none;
}
.logo-sub {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: #111827;
  white-space: nowrap;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  padding: 0 0.75rem;
  border-radius: 0.75rem;
  background: #4f46e5;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}
.header-cta:hover { background: #4338ca; color: #fff; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  cursor: pointer;
}
.nav-toggle:hover { background: #f3f4f6; }
.nav-toggle span {
  display: block;
  height: 1.5px;
  margin: 0 7px;
  background: #111827;
}

.nav-backdrop {
  display: none;
  position: fixed;
  z-index: 40;
  inset: 3.5rem 0 0;
  border: 0;
  background: rgba(17, 24, 39, 0.35);
  cursor: pointer;
}

@media (min-width: 960px) {
  .nav-toggle { display: none; }
}

/* Layout — left nav + content, same split as the builder editor. */
.docs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 3.5rem);
  margin: 0;
  gap: 0;
  padding: 0;
}

@media (min-width: 960px) {
  .docs { grid-template-columns: 288px minmax(0, 1fr); }
}

#side-nav-host {
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
}

.side-nav {
  display: none;
  padding: 1rem 1rem 1.25rem;
  font-size: 14px;
}

@media (min-width: 960px) {
  .side-nav {
    display: block;
    position: sticky;
    top: 3.5rem;
    max-height: calc(100vh - 3.5rem);
    overflow-y: auto;
  }
}

@media (max-width: 959px) {
  body.nav-open .side-nav {
    display: block;
    position: fixed;
    z-index: 45;
    top: 3.5rem;
    left: 0;
    bottom: 0;
    width: min(288px, 86vw);
    overflow-y: auto;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
  }
  body.nav-open .nav-backdrop { display: block; }
  body.nav-open #side-nav-host { border-right: 0; }
}

.side-group {
  margin: 1.25rem 0 0.25rem;
  padding: 0 0.875rem;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #6b7280;
}
.side-nav .side-group:first-child { margin-top: 0.25rem; }
.side-nav a {
  display: flex;
  align-items: center;
  height: 2.25rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}
.side-nav a:hover { background: #f3f4f6; color: #111827; }
.side-nav a.is-active {
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
  font-weight: 500;
}

.docs-main {
  min-width: 0;
  min-height: calc(100vh - 3.5rem);
  background: #fff;
  display: flex;
  flex-direction: column;
}

#obsah { padding: 2rem 2.5rem 0.5rem; }
.prose { max-width: 68ch; }
.prose h1 { font-size: var(--text-3xl); margin-bottom: 0.35em; }
.prose .lead {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
  max-width: 54ch;
}
.prose h2 { font-size: var(--text-xl); margin-top: 1.75em; }
.prose h3 { font-size: var(--text-lg); margin-top: 1.35em; }
.prose li { margin-bottom: 0.35em; }
.prose code {
  font-size: 0.9em;
  background: var(--blue-50);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  position: relative;
  padding: 0.85rem 0 0.85rem 3rem;
  border-bottom: 1px solid var(--border);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--orbiso-blue);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.note {
  background: var(--blue-25);
  border: 1px solid var(--blue-100);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}
.note p:last-child { margin-bottom: 0; }

.warn {
  background: #fff6f0;
  border: 1px solid #f3d5c4;
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}

/* Home */
.hero {
  padding: 0 0 var(--space-6);
}
.hero h1 { font-size: var(--text-3xl); }
.hero .lead { font-size: var(--text-lg); color: var(--text-muted); max-width: 48ch; }

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1020px) {
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.35rem 1.4rem 1.25rem;
  box-shadow: var(--shadow-sm);
  color: inherit;
  display: block;
}
.card:hover { border-color: var(--blue-100); color: inherit; }
.card h2, .card h3 { font-size: var(--text-lg); margin-bottom: 0.35em; }
.card p { color: var(--text-muted); margin: 0; font-size: 0.98rem; }

.news-item {
  display: block;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
}
.news-item:hover { color: inherit; }
.news-item time { color: var(--text-muted); font-size: var(--text-sm); }
.news-item h3 { margin: 0.2em 0 0.3em; font-size: var(--text-lg); }

.status-list { list-style: none; padding: 0; }
.status-list li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
.tag {
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--r-pill);
  padding: 0.15rem 0.55rem;
  background: var(--blue-50);
  color: var(--orbiso-blue);
  white-space: nowrap;
}
.tag-open { background: var(--pink-50); color: #b42354; }
.tag-done { background: var(--success-soft); color: var(--success); }

.dl {
  display: grid;
  gap: 1rem;
}
.dl dt { font-family: var(--font-heading); font-weight: 700; }
.dl dd { margin: 0.2em 0 0; color: var(--text-muted); }

/* HTML rekonstrukce prvků Builderu. Nejsou to ovládací prvky: nic se nedá stisknout. */
.ui { margin: 1.5rem 0; }
.ui figcaption {
  margin-top: 0.5rem;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}
.stage {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  line-height: 1.4;
  pointer-events: none;
  user-select: none;
}
.stage svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 2.75rem;
  padding: 0 0.85rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}
.app-logo { height: 16px; width: auto; }
.app-rule { width: 1px; height: 1.1rem; background: #e5e7eb; }
.app-dot { width: 8px; height: 8px; border-radius: 2px; background: #4f46e5; }
.app-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.app-status { flex: none; color: #b45309; font-weight: 600; font-size: 12px; }
.app-spacer { flex: 1; }
.app-media {
  flex: none;
  height: 1.6rem;
  padding: 0 0.55rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}
.app-avatar {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
}
.app-body { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); min-height: 16rem; }
.app-side {
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
  padding: 0.6rem 0.45rem;
}
.app-search {
  height: 1.75rem;
  margin-bottom: 0.35rem;
  padding: 0 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  color: #9ca3af;
  display: flex;
  align-items: center;
  font-size: 12px;
}
.app-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 1.7rem;
  padding: 0 0.45rem;
  border-radius: 0.4rem;
  color: #374151;
}
.app-row svg { color: #6b7280; }
.app-row-on { background: rgba(79, 70, 229, 0.12); color: #4f46e5; font-weight: 600; }
.app-row-on svg { color: #4f46e5; }
.app-child { padding-left: 1.35rem; }
.app-label {
  margin: 0.45rem 0.45rem 0.15rem;
  color: #9ca3af;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.app-main { padding: 0.85rem 1rem 1rem; }
.app-save { text-align: right; color: #6b7280; font-size: 12px; }
.app-h { margin: 0.2rem 0 0.45rem; font-size: 1.15rem; font-weight: 700; }
.app-p { margin: 0 0 0.4rem; }
.app-ghost { color: #9ca3af; }

.menu-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 15.5rem; }
.menu-page { padding: 1rem 1rem 1.25rem; }
.menu-page p { margin: 0 0 0.75rem; }
.menu-line { display: flex; align-items: center; gap: 0.45rem; color: #9ca3af; }
.menu-plus {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.3rem;
  background: #4f46e5;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.menu {
  border-left: 1px solid #e5e7eb;
  background: #fff;
  padding: 0.4rem;
}
.menu-search {
  height: 1.7rem;
  margin-bottom: 0.25rem;
  padding: 0 0.45rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.4rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  font-size: 12px;
}
.menu-group {
  margin: 0.35rem 0.35rem 0.1rem;
  color: #9ca3af;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.menu-item {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  height: 1.55rem;
  padding: 0 0.4rem;
  border-radius: 0.35rem;
}
.menu-item-on { background: rgba(79, 70, 229, 0.12); color: #4f46e5; }
.menu-hint { margin-left: auto; color: #9ca3af; font-size: 11px; }
.menu-off { color: #9ca3af; }

.bubble-stage { padding: 0.85rem 1rem 1rem; }
.bubble {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 0.65rem;
  padding: 3px;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}
.mk {
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.3rem;
  border-radius: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.mk-on { background: rgba(79, 70, 229, 0.12); color: #4f46e5; }
.mk-i { font-style: italic; }
.mk-s { text-decoration: line-through; }
.mk-rule { width: 1px; height: 1rem; margin: 0 3px; background: #e5e7eb; }
.bubble-text { margin: 0; }
.bubble-text mark {
  background: #e0e7ff;
  color: inherit;
  border-radius: 2px;
  padding: 0 0.1em;
}

.pair { display: grid; grid-template-columns: 1fr 1fr; }
.pair-col { padding: 0.75rem; }
.pair-col + .pair-col { border-left: 1px solid #e5e7eb; background: #f9fafb; }
.pair-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
  font-weight: 700;
}
.pair-lead { margin: 0 0 0.6rem; color: #6b7280; font-size: 12px; }
.pair-cat {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  font-weight: 600;
  font-size: 12px;
}
.pair-count { color: #9ca3af; font-weight: 500; }
.pair-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 1.7rem;
  padding: 0 0.35rem;
  border-radius: 0.35rem;
}
.kind {
  min-width: 3.1rem;
  padding: 0.05rem 0.3rem;
  border-radius: 0.3rem;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}
.pair-tools { display: flex; gap: 0.35rem; margin-bottom: 0.55rem; }
.pair-search {
  flex: 1;
  height: 1.7rem;
  padding: 0 0.45rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.4rem;
  background: #fff;
  color: #9ca3af;
  display: flex;
  align-items: center;
  font-size: 12px;
}
.pair-upload {
  height: 1.7rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.file { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.35rem; }
.thumb {
  width: 2rem;
  height: 1.5rem;
  border-radius: 0.25rem;
  background: linear-gradient(135deg, #c7d2fe, #e0e7ff);
}
.thumb-video { background: linear-gradient(135deg, #1f2937, #4b5563); }

.pub { padding: 0.9rem 1rem 0.4rem; }
.pub-title { margin: 0; font-size: 1.15rem; font-weight: 700; }
.pub-lead { margin: 0.15rem 0 0.85rem; color: #6b7280; }
.pub-step { display: flex; gap: 0.55rem; margin-bottom: 0.85rem; }
.pub-n {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
.pub-h { font-weight: 700; }
.pub-hint { color: #6b7280; font-size: 12px; }
.pub-body { margin-top: 0.4rem; }
.field {
  height: 1.8rem;
  margin-top: 0.3rem;
  padding: 0 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.45rem;
  display: flex;
  align-items: center;
}
.cover {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  color: #6b7280;
  font-size: 12px;
}
.cover-box {
  width: 4.2rem;
  height: 2.6rem;
  border: 1px dashed #d1d5db;
  border-radius: 0.4rem;
  background: #f9fafb;
}
.choice {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 1.65rem;
}
.radio {
  width: 0.8rem;
  height: 0.8rem;
  border: 1.5px solid #d1d5db;
  border-radius: 999px;
}
.radio-on { border-color: #4f46e5; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 8px #4f46e5; }
.pub-btn {
  height: 1.8rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}

@media (max-width: 640px) {
  .app-body, .menu-wrap, .pair { grid-template-columns: 1fr; }
  .app-side { border-right: 0; border-bottom: 1px solid #e5e7eb; }
  .menu { border-left: 0; border-top: 1px solid #e5e7eb; }
  .pair-col + .pair-col { border-left: 0; border-top: 1px solid #e5e7eb; }
  .bubble { flex-wrap: wrap; }
}

.tree,
.tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tree { margin: 1.25rem 0; }
.tree ul {
  margin-left: 0.75rem;
  padding-left: 1.25rem;
  border-left: 1px solid #e5e7eb;
}
.tree li { margin: 0.5rem 0; line-height: 1.5; }
.tree-node {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}
.tree-root { background: rgba(79, 70, 229, 0.12); border-color: transparent; color: #4f46e5; }
.tree-alt { border-style: dashed; }
.tree-note { color: #6b7280; font-size: 14px; margin-left: 0.35rem; }

.mermaid-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.site-footer {
  margin-top: auto;
  padding: 1.5rem 2.5rem 2rem;
  color: #6b7280;
  font-size: 13px;
}
.site-footer a { color: #111827; font-weight: 500; }
.site-footer a:hover { color: #4f46e5; }

@media (max-width: 720px) {
  #obsah { padding: 1.5rem 1.25rem 0.5rem; }
  .site-footer { padding: 1.25rem 1.25rem 1.75rem; }
}
