/* Obrivo Dokumentacija — design tokens from product brand */
:root {
  --obrivo-seafoam: #35c1b6;
  --obrivo-teal: #0d3b3e;
  --obrivo-slate: #1f2933;
  --primary-500: #14b8a6;
  --primary-600: #0d9488;
  --primary-700: #0f766e;
  --primary-50: #f0fdfa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --sidebar-w: 280px;
  --header-h: 64px;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(15 23 42 / 5%), 0 6px 18px rgb(15 23 42 / 5%);
  --shadow-hover: 0 2px 4px rgb(15 23 42 / 6%), 0 10px 28px rgb(13 148 136 / 10%);
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-display: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --focus: 0 0 0 3px rgb(13 148 136 / 35%);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgb(53 193 182 / 12%), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgb(13 59 62 / 8%), transparent 50%),
    var(--surface-2);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary-600); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--obrivo-teal);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--obrivo-teal);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand img { width: 28px; height: 28px; }
.brand-text { font-size: 0.95rem; }
.brand-sub {
  display: none;
  margin-left: 0.35rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0;
  font-size: 0.85rem;
}
@media (min-width: 640px) {
  .brand-sub { display: inline; }
}

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

.search-wrap {
  position: relative;
  width: min(320px, 42vw);
}
.search-wrap input {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.9rem 0.55rem 2.2rem;
  font: inherit;
  font-size: 0.92rem;
}
.search-wrap .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 360px;
  overflow: auto;
  display: none;
  z-index: 60;
}
.search-results.open { display: block; }
.search-results a {
  display: block;
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover,
.search-results a[aria-selected="true"] { background: var(--primary-50); }
.search-results .meta {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
@media (min-width: 980px) {
  .menu-toggle { display: none; }
}

/* Shell */
.shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - var(--header-h));
}
@media (min-width: 980px) {
  .shell { grid-template-columns: var(--sidebar-w) 1fr; }
}

.sidebar {
  position: fixed;
  inset: var(--header-h) auto 0 0;
  width: min(var(--sidebar-w), 88vw);
  background: #fff;
  border-right: 1px solid var(--border);
  overflow: auto;
  transform: translateX(-105%);
  transition: transform 0.2s ease;
  z-index: 40;
  padding: 1rem 0.75rem 2rem;
}
.sidebar.open { transform: translateX(0); }
@media (min-width: 980px) {
  .sidebar {
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    transform: none;
    width: auto;
  }
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgb(15 23 42 / 35%);
  z-index: 35;
}
.sidebar-backdrop.show { display: block; }
@media (min-width: 980px) {
  .sidebar-backdrop { display: none !important; }
}

.nav-group { margin-bottom: 0.85rem; }
.nav-group-title {
  margin: 0;
  padding: 0.45rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nav-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-group a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 550;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-group a:hover { background: var(--surface-2); color: var(--primary-700); }
.nav-group a[aria-current="page"] {
  background: var(--primary-50);
  color: var(--primary-700);
  box-shadow: inset 3px 0 0 var(--primary-600);
  border-radius: 0 8px 8px 0;
}

/* Top Domov category — distinct but quiet */
.nav-group-home {
  margin-bottom: 0.35rem;
}
.nav-group-home .nav-group-title {
  letter-spacing: 0.1em;
  color: var(--obrivo-teal);
  opacity: 0.85;
}
.nav-group-home .nav-home-link {
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--obrivo-teal);
  padding: 0.5rem 0.7rem;
}
.nav-group-home .nav-home-link:hover {
  background: var(--primary-50);
}
.nav-group-home .nav-home-link[aria-current="page"] {
  background: var(--primary-50);
  color: var(--primary-700);
  box-shadow: inset 3px 0 0 var(--primary-600);
  border-radius: 0 8px 8px 0;
}

.nav-divider {
  border: 0;
  height: 0;
  border-top: 1px solid var(--border);
  margin: 0.55rem 0.85rem 1.1rem;
  opacity: 0.9;
}

/* Home landing */
.page-home .content-wrap {
  max-width: 920px;
}
.page-home .article-header-home {
  margin-bottom: 0.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.page-home .article-header-home h1 {
  font-size: clamp(2rem, 3.2vw, 2.55rem);
  letter-spacing: -0.025em;
}
.page-home .article-header-home .article-lead {
  font-size: 1.14rem;
  max-width: 36rem;
  margin: 0.65rem 0 0;
  line-height: 1.55;
}
.page-home .prose-home > p:first-child {
  font-size: 1.02rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  max-width: 36rem;
}
.page-home .prose-home h2 {
  margin-top: 0;
  margin-bottom: 0.85rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.page-home .prose-home h2:first-of-type {
  margin-top: 1.5rem;
}
.page-home .prose-home ul {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
}
.page-home .prose-home ul li {
  padding: 0.15rem 0;
}
.page-home .prose-home ol {
  padding-left: 1.25rem;
  margin: 0 0 0.5rem;
}
.page-home .prose-home ol li {
  margin: 0.55rem 0;
  line-height: 1.55;
}
.page-home .prose-home .callout {
  margin-top: 2rem;
}

.content-wrap {
  padding: 1.35rem 1.35rem 3.25rem;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary-700); }
.breadcrumbs span[aria-hidden="true"] { opacity: 0.5; }

.article-header h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  line-height: 1.2;
  color: var(--obrivo-teal);
  letter-spacing: -0.02em;
}
.article-lead {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.role-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.badge-admin { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.badge-vodja { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.badge-delavec { background: #f8fafc; color: #334155; border-color: #cbd5e1; }
.badge-all { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.badge-soon { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }

.prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
  color: var(--obrivo-teal);
}
.prose h3 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1.1rem;
}
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin: 0.25rem 0; }
.prose strong { font-weight: 700; }

.callout {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1.15rem 0 1.35rem;
  box-shadow: var(--shadow);
}
.callout-title {
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--obrivo-teal);
}
.callout > p:last-child { margin-bottom: 0; }
.callout.role-admin { border-left: 4px solid #059669; }
.callout.role-vodja { border-left: 4px solid #2563eb; }
.callout.role-delavec { border-left: 4px solid #64748b; }
.callout.tip { border-left: 4px solid var(--primary-600); background: var(--primary-50); }
.callout.warn { border-left: 4px solid #d97706; background: #fffbeb; }

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}
.steps > li {
  position: relative;
  padding: 0.85rem 0.85rem 0.85rem 3rem;
  margin: 0 0 0.65rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.75rem;
  top: 0.85rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--obrivo-teal);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.shot {
  margin: 1.35rem 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.shot:hover {
  box-shadow: var(--shadow-hover);
}
.shot img { width: 100%; height: auto; }
.shot figcaption {
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* Mobile app screenshots — phone-like width; Web shots stay full column */
.shot.shot--mobile,
.shot.figure-mobile,
.shot:has(> img[src*="/assets/screenshots/mobile/"]) {
  max-width: min(320px, 90%);
  margin-left: auto;
  margin-right: auto;
}
.shot.shot--mobile img,
.shot.figure-mobile img,
.shot:has(> img[src*="/assets/screenshots/mobile/"]) img {
  width: 100%;
  height: auto;
}

.meta-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  margin: 1rem 0 1.5rem;
}
@media (min-width: 640px) {
  .meta-grid { grid-template-columns: 1fr 1fr; }
}
.meta-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.meta-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.meta-card p { margin: 0; font-size: 0.95rem; }

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.pager a {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.9rem 1.05rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  min-width: min(100%, 220px);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.pager a:hover {
  border-color: #99f6e4;
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}
.pager a span {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}
.pager a strong { color: var(--primary-700); }
.pager .next { margin-left: auto; text-align: right; }

.home-hero {
  background: linear-gradient(145deg, #0d3b3e 0%, #115e59 45%, #0d9488 100%);
  color: #fff;
  border-radius: 18px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.home-hero h1 { color: #fff; margin: 0 0 0.5rem; }
.home-hero p { margin: 0; color: rgb(255 255 255 / 88%); max-width: 42rem; }
.card-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
  margin: 0 0 0.5rem;
}
@media (min-width: 700px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .card-grid.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.card-grid a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.card-grid a:hover {
  border-color: #99f6e4;
  background: var(--primary-50);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}
.card-grid a strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--obrivo-teal);
  letter-spacing: -0.01em;
}
.card-grid a span {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 450;
}
.card-grid h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--obrivo-teal);
}
.card-grid p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

.link-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 1fr;
  margin: 0 0 0.5rem;
}
@media (min-width: 560px) {
  .link-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 860px) {
  .link-grid { grid-template-columns: 1fr 1fr 1fr; }
  .link-grid.link-grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.link-grid a {
  display: block;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.link-grid a:hover {
  border-color: #99f6e4;
  background: var(--primary-50);
  color: var(--primary-700);
  box-shadow: var(--shadow-hover);
}

.closing-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2.25rem 0 2rem;
  padding: 1.5rem 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.closing-logo img {
  width: 140px;
  max-width: min(140px, 42vw);
  height: auto;
  display: block;
  margin: 0;
}

.page-home .prose-home .card-grid,
.page-home .prose-home .link-grid {
  margin-top: 0.15rem;
}

.site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}
.site-footer .footer-copy {
  margin: 0 0 0.45rem;
}
.site-footer .footer-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.15rem 0;
  line-height: 1.55;
}
.site-footer .footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.site-footer .footer-links a:hover {
  color: var(--primary-700);
  text-decoration: underline;
}
.site-footer .footer-sep {
  white-space: pre;
  opacity: 0.7;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
}
th, td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
th { background: var(--surface-2); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

.placeholder-note {
  padding: 1rem;
  border: 1px dashed #fdba74;
  background: #fff7ed;
  border-radius: var(--radius);
}
