/* cai.type.sk — verejný web. Farby ako tokeny; tmavý režim podľa systému. */

:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --fg: #0B1220;
  --body: #3F4859;
  --muted: #5A6474;
  --line: #E6E8EE;
  --soft: #F4F6FA;
  --tint: #EEF2FF;
  --tint-line: #DCE3F5;
  --field-line: #D5DCEC;
  --accent: #2F5BEA;
  --accent-strong: #2346B8;
  --on-accent: #FFFFFF;
  --hover: #F2F5FF;
  --hover-line: #C9D6FB;
  --pill-hover: #E4EAFF;
  --chip: #EEF2FF;
  --chip-fg: #2346B8;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1320;
    --surface: #131A2A;
    --fg: #E8ECF4;
    --body: #B8C1D1;
    --muted: #8D97A8;
    --line: #243047;
    --soft: #121827;
    --tint: #121B30;
    --tint-line: #24324F;
    --field-line: #2C3A58;
    --accent: #7C9BFF;
    --accent-strong: #A9BCFF;
    --hover: #18213A;
    --hover-line: #34477A;
    --pill-hover: #1E2A47;
    --chip: #1A2440;
    --chip-fg: #A9BCFF;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
.mono { font-family: var(--mono); }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* hlavička */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header.on-tint { background: transparent; border-bottom-color: var(--tint-line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { color: var(--fg); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand:hover { color: var(--fg); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 15px; }
.nav a { color: var(--body); padding: 10px 14px; border-radius: 8px; }
.nav a:hover { color: var(--fg); background: var(--soft); }
.nav a[aria-current="page"] { color: var(--chip-fg); background: var(--chip); font-weight: 500; }
.nav .icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 10px; background: var(--soft); color: var(--fg); }

/* úvodný pás */
.hero { background: var(--tint); }
.hero-body { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 72px; }
.hero-text { flex: 999 1 560px; min-width: 0; }
.eyebrow { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--body); font-size: 13px; font-weight: 500; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: var(--accent); }
.hero h1 { margin: 24px 0 0; font-weight: 700; font-size: clamp(40px, 6vw, 64px); line-height: 1; letter-spacing: -0.04em; }
.hero p.lead { margin: 20px 0 0; font-size: 18px; line-height: 1.6; color: var(--body); max-width: 560px; }

.search-form { display: flex; max-width: 560px; background: var(--surface); border: 1px solid var(--field-line); border-radius: 12px; padding: 6px; }
.search-form input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 16px; height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--fg); outline: none; }
.search-form:focus-within { border-color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: #2F5BEA; color: var(--on-accent); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn:hover { background: #2346B8; color: var(--on-accent); }
.btn-ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--line); font-weight: 500; }
.btn-ghost:hover { background: var(--hover); color: var(--fg); }
.search-help { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 560px; }
.search-help .mono { color: var(--body); }

.issue-card { flex: 1 1 320px; min-width: 0; display: block; padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--field-line); color: var(--fg); }
.issue-card:hover { color: var(--fg); border-color: var(--hover-line); }
.issue-card .label { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.issue-card .label span:first-child { font-weight: 600; color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; }
.issue-card .big { margin-top: 18px; font-weight: 700; font-size: 40px; line-height: 1; letter-spacing: -0.03em; }
.issue-card .meta { margin-top: 12px; font-size: 15px; color: var(--muted); }
.issue-card .btn { margin-top: 24px; }

/* sekcie */
main { padding-top: 64px; padding-bottom: 80px; }
.section + .section { margin-top: 72px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head h2 { margin: 0; font-weight: 700; font-size: 30px; letter-spacing: -0.025em; }
.section-head a { font-size: 15px; font-weight: 500; }

/* karty článkov */
.cards { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--fg); transition: background-color .18s ease, border-color .18s ease; }
.card-title { font-weight: 600; font-size: 18px; line-height: 1.35; letter-spacing: -0.01em; transition: color .18s ease; }
.card:hover { background: var(--hover); border-color: var(--hover-line); color: var(--fg); }
.card:hover .card-title { color: var(--accent-strong); }
.card .clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card .authors { font-size: 14px; line-height: 1.5; color: var(--muted); }
.card .meta { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card .meta span { overflow-wrap: anywhere; }

/* archív */
.volumes { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); column-gap: 48px; }
.volumes li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.volume-label { flex: 0 0 auto; display: flex; align-items: baseline; gap: 10px; min-width: 128px; color: var(--fg); }
.volume-label:hover { color: var(--accent-strong); }
.volume-label b { font-size: 18px; letter-spacing: -0.01em; }
.volume-label span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 4px; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 8px; color: var(--fg); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; transition: background-color .15s ease, color .15s ease; }
.pill:hover { background: var(--pill-hover); color: var(--accent-strong); }

/* hlavička podstránky */
.page-head { background: var(--soft); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: 32px; padding-bottom: 40px; }
.breadcrumb { font-size: 14px; color: var(--muted); }
.breadcrumb span[aria-hidden] { margin: 0 6px; }
.page-head h1 { margin: 20px 0 0; font-weight: 700; font-size: clamp(36px, 5vw, 52px); line-height: 1.04; letter-spacing: -0.035em; }
.tags { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--fg); }

/* pätička */
.site-footer { background: var(--soft); color: var(--body); border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 40px; font-size: 14px; }
.site-footer .name { font-weight: 700; color: var(--fg); }
.site-footer .issn { margin-top: 6px; font-family: var(--mono); font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer nav a { color: var(--body); }
.site-footer nav a:hover { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  .card, .card-title, .pill { transition: none; }
}

/* číslo */
.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.pager { display: flex; gap: 8px; }
.toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.toc-item { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 16px 32px; padding: 24px 28px; }
.toc-main { flex: 999 1 560px; min-width: 0; }
.toc-main .card-title { display: block; font-size: 20px; color: var(--fg); }
.toc-authors { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--body); }
.toc-item .meta { margin: 10px 0 0; padding: 0; }
.toc-item .meta a { overflow-wrap: anywhere; }
.toc-actions { flex: 1 1 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: 8px; }
.abstract-btn::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.abstract-btn[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.toc-abstract { flex: 1 1 100%; padding-top: 16px; border-top: 1px solid var(--line); }
.toc-abstract p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--fg); max-width: 80ch; }
.toc-abstract a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; }

/* článok */
.article-title { font-size: clamp(30px, 4vw, 44px) !important; line-height: 1.1 !important; letter-spacing: -0.03em; max-width: 920px; }
.authors { margin: 24px 0 0; font-size: 17px; line-height: 1.7; max-width: 920px; }
.author { font-weight: 500; }
.author > a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--field-line); text-underline-offset: 4px; }
.author > a:hover { color: var(--accent-strong); text-decoration-color: currentColor; }
.author sup { font-size: 11px; font-weight: 600; margin-left: 2px; }
.affiliations { margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 920px; }
.affiliations li { display: flex; gap: 8px; scroll-margin-top: 24px; }
.affiliations li:target { color: var(--fg); }
.affiliations sup { flex: 0 0 14px; font-size: 11px; color: var(--accent); font-weight: 600; }
.more-authors summary { margin-top: 12px; cursor: pointer; color: var(--accent); font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.article-layout { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-top: 40px; }
.article-body { flex: 999 1 600px; min-width: 0; }
.article-aside { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.label { margin: 36px 0 0; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.article-body > .label:first-child, .aside-box .label, .article-aside section .label { margin-top: 0; }
.abstract { margin: 14px 0 0; font-size: 18px; line-height: 1.75; max-width: 70ch; }
.chips { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; background: var(--chip); color: var(--chip-fg); font-size: 14px; }
.msc { margin: 10px 0 0; font-size: 14px; color: var(--body); }
.cite { margin-top: 44px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; }
.cite-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.cite-head h2 { margin: 0; font-size: 16px; }
.segmented { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--line); }
.segmented button { height: 36px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--body); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--fg); }
.cite pre { margin: 0; padding: 4px 20px 20px; font-family: var(--mono); font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.cite-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.aside-box { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 16px; }
.btn-wide { width: 100%; height: 52px; border-radius: 12px; font-size: 16px; }
.doi { display: block; margin-top: 6px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facts { margin: 0; padding-top: 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.muted { color: var(--muted); }
.siblings { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sibling { gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--soft); border-color: var(--soft); }
.sibling .card-title { font-size: 14px; line-height: 1.4; font-weight: 500; }
.sibling .muted { font-size: 13px; }
.more { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; }

/* vyhľadávanie */
.result-count { margin: 0 0 16px; color: var(--body); }
.snippet { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--body); }
.snippet mark { background: var(--chip); color: var(--chip-fg); border-radius: 3px; padding: 0 2px; }
.pagination { margin-top: 24px; justify-content: space-between; }

/* statické stránky */
.page-layout { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-top: 40px; }
.prose { flex: 999 1 600px; min-width: 0; max-width: 760px; font-size: 17px; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 40px 0 12px; font-size: 22px; letter-spacing: -0.015em; line-height: 1.3; }
.prose h3 { margin: 28px 0 8px; font-size: 18px; }
.prose p, .prose ul, .prose ol, .prose dl { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; }
.prose dt { color: var(--muted); }
.prose dd { margin: 0; }
.prose a { text-decoration: underline; text-decoration-color: var(--field-line); text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose a:hover { text-decoration-color: currentColor; }
.prose code { font-family: var(--mono); font-size: 0.9em; background: var(--soft); padding: 1px 5px; border-radius: 4px; }
.page-list { list-style: none; padding: 0 !important; margin-top: 32px !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.page-list li { margin: 0; }
.page-list .card { padding: 20px; gap: 6px; text-decoration: none; }
.page-list .muted { font-size: 14px; line-height: 1.5; }
.page-aside { flex: 1 1 260px; min-width: 0; }
.section-nav { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.section-nav a { display: block; padding: 8px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--body); font-size: 15px; }
.section-nav a:hover { color: var(--fg); }
.section-nav a[aria-current="page"] { border-left-color: var(--accent); color: var(--fg); font-weight: 600; }

/* prihlásenie a formuláre */
.login { max-width: 420px; padding-top: 64px; }
.login h1 { margin: 0; font-size: 32px; letter-spacing: -0.025em; }
.login .muted { margin: 8px 0 24px; }
.form { display: flex; flex-direction: column; gap: 8px; }
.form label { font-size: 14px; font-weight: 500; color: var(--body); margin-top: 8px; }
.form input { font: inherit; height: 44px; padding: 0 12px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--surface); color: var(--fg); }
.form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form .btn { margin-top: 16px; }
.form-error { margin: 0 0 8px; padding: 10px 14px; border-radius: 10px; background: #FDECEC; color: #9B1C1C; font-size: 14px; }
@media (prefers-color-scheme: dark) { .form-error { background: #3A1618; color: #F8B4B4; } }

/* interná sekcia */
.internal { padding-top: 32px; }
.internal h1 { margin: 12px 0 8px; font-size: 32px; letter-spacing: -0.025em; }
.internal-section { margin-top: 40px; }
.internal-section h2 { margin: 0 0 12px; font-size: 20px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.status-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.status-table th { text-align: left; font-weight: 600; color: var(--muted); background: var(--soft); padding: 10px 12px; white-space: nowrap; }
.status-table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.status-table td a { color: var(--fg); }
.status-table td a:hover { color: var(--accent-strong); }
.small { font-size: 13px; }
.state { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--chip-fg); font-size: 13px; font-weight: 500; white-space: nowrap; }
.state-published, .state-author { background: var(--soft); color: var(--body); }
.chip-warn { display: inline-block; padding: 1px 8px; margin: 1px 0; border-radius: 999px; background: #FFF4E5; color: #8A4B00; font-size: 12px; }
.ok { color: #1E7A3A; }
.bad { color: #B42318; }
@media (prefers-color-scheme: dark) { .chip-warn { background: #3A2A12; color: #F5C67A; } .ok { color: #6FCF97; } .bad { color: #F49A92; } }
.internal-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.internal-grid .label { margin-top: 0; }
.internal-grid .label + * { margin-top: 10px; }
.internal-grid .facts { border-top: 0; padding-top: 0; }
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.round-row { padding: 12px 0; border-top: 1px solid var(--line); }
.round-row ul { margin-top: 6px; }
.nowrap { white-space: nowrap; }
.status-table th { white-space: normal; min-width: 72px; vertical-align: bottom; }

/* časová os pod riadkom článku — spoločná pre celé číslo */
:root { --c-work: #2F5FD0; --c-wait: #7A8394; --c-proof: #C2620E; --c-author: #7C4DEB; --c-fix: #0E8A76; }
@media (prefers-color-scheme: dark) { :root { --c-work: #7EA2FF; --c-wait: #9AA3B2; --c-proof: #F0A050; --c-author: #B79CFF; --c-fix: #4FD1B5; } }
.c-work { color: var(--c-work); } .c-wait { color: var(--c-wait); } .c-proof { color: var(--c-proof); }
.c-author { color: var(--c-author); } .c-fix { color: var(--c-fix); }
.status-table tr:has(+ .timeline-row) td { border-bottom: 0; }
.timeline-row td { border-top: 0 !important; padding-top: 0; }
.axis-row td { padding-top: 6px; padding-bottom: 0; }
.timeline-wrap { display: flex; align-items: center; gap: 10px; }
.timeline-total { flex: 0 0 64px; font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; }
.axis, .axis-scale { position: relative; flex: 1 1 auto; }
.axis { height: 10px; }
.axis::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.axis .dot { position: absolute; top: 50%; transform: translate(-50%, -50%); }
.phase { display: block; border-radius: 3px; }
.phase-work { background: var(--c-work); }
.phase-proof { background: var(--c-proof); }
.phase-author { background: var(--c-author); }
.phase-fix { background: var(--c-fix); }
.phase-wait { background: var(--c-wait); }
.phase.ongoing { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 3px, transparent 3px 6px); }
.axis-scale { height: 18px; font-size: 11px; color: var(--muted); }
.axis-edge { position: absolute; top: 0; }
.axis-tick { position: absolute; top: 0; height: 100%; border-left: 1px solid var(--line); }
.axis-tick span { position: absolute; left: 3px; top: 0; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { display: inline-block; flex: none; }
.dot { display: block; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.dot.multi { width: 12px; height: 12px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px currentColor; color: var(--muted); }
.axis { height: 14px; }

/* týždenné značky (pondelky) — opakované pozadie od prvého pondelka */
.weekly::after { content: ""; position: absolute; left: var(--wk-left); right: 0; pointer-events: none;
  background-image: linear-gradient(to right, var(--wk-color, #C9CFDA) 1px, transparent 1px);
  background-size: var(--wk-size) 100%; background-repeat: repeat-x; }
.axis.weekly::after { top: calc(50% - 3px); height: 7px; }
.axis-scale.weekly::after { bottom: 0; height: 4px; }
@media (prefers-color-scheme: dark) { .weekly { --wk-color: #3A4560; } }

/* prehľad: článok = blok troch riadkov (údaje, míľniky, os) */
.article-table td { border-top: 0; padding: 4px 12px; }
.article-table tbody.article { border-top: 1px solid var(--line); }
.article-table tbody.article:hover { background: var(--hover); }
.article-table tbody.scale td { padding-top: 6px; padding-bottom: 2px; }
.article-table .art-head td { padding-top: 10px; padding-bottom: 2px; }
.article-table .timeline-row td { padding-top: 2px; padding-bottom: 10px; }
/* šírka 0 + min 100 %: dlhý text nerozťahuje tabuľku, skráti sa trojbodkou */
.art-line { display: flex; align-items: baseline; gap: 10px; width: 0; min-width: 100%; color: var(--fg); }
.art-line:hover { color: var(--fg); }
.art-line:hover .art-title { color: var(--accent-strong); }
.art-pos { flex: none; color: var(--muted); }
.art-line b { flex: none; }
.art-title { flex: 0 1 auto; min-width: 0; max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.art-authors { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }

/* interná sekcia na celú šírku obrazovky */
.wrap.internal, .wrap.wide { max-width: none; }

/* deadline uzavretia článku (1. autorské kolo + N dní) */
:root { --dl-open: #C2620E; --dl-overdue: var(--b-overdue); --dl-done: var(--b-approved); }
@media (prefers-color-scheme: dark) { :root { --dl-open: #F0A050; } }
.dl-open { color: var(--dl-open); } .dl-overdue { color: var(--dl-overdue); } .dl-done { color: var(--dl-done); }
.axis .deadline { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dashed currentColor; transform: translateX(-1px); }
.axis .deadline::after { content: ""; position: absolute; top: -3px; left: -5px; border: 4px solid transparent; border-top: 5px solid currentColor; }
.deadline-key { display: inline-block; width: 0; height: 12px; border-left: 2px dashed currentColor; margin: 0 4px 0 2px; vertical-align: middle; }
.closable { margin-right: 12px; padding: 2px 10px; border-radius: 999px; background: var(--chip); color: var(--chip-fg); font-size: 13px; font-weight: 500; }

/* detail: míľniky ako zvislá časová os */
.history { list-style: none; margin: 10px 0 0; padding: 0; position: relative; }
.history::before { content: ""; position: absolute; left: 97px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.history li { display: grid; grid-template-columns: 88px 14px minmax(0, 1fr); align-items: start; column-gap: 12px; padding: 5px 0; }
.history .h-date { font-size: 13px; color: var(--muted); padding-top: 1px; }
.history .dot { margin-top: 4px; position: relative; }
.history .h-mark { display: block; width: 0; height: 16px; margin: 1px 0 0 5px; border-left: 2px dashed currentColor; }
.history .h-label { font-weight: 500; }
.history li.future { opacity: 0.7; }
.phase-note { background: var(--surface); box-shadow: 0 0 0 2px var(--surface), inset 0 0 0 2px var(--c-wait); }
.files li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
/* trvanie medzi míľnikmi: štítok na spojovacej čiare */
.history li.h-between { grid-template-columns: 88px minmax(0, 1fr); padding: 0; }
.history .gap-chip { justify-self: start; margin-left: -1px; padding: 0 6px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-size: 11px; line-height: 16px; color: var(--muted); position: relative; transform: translateX(calc(-50% + 7px)); }
.h-deadline { display: block; font-size: 13px; margin-top: 2px; }
.h-deadline .deadline-key { margin-left: 0; }

/* detail článku: míľniky vľavo, údaje a autorský link vpravo */
.detail-layout { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.detail-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail-layout .label { margin-top: 0; }
.detail-layout .aside-box > .label + * { margin-top: 10px; }
.detail-layout .facts { border-top: 0; padding-top: 0; }
.sublabel { margin: 20px 0 4px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.link-url { margin: 8px 0 4px; overflow-wrap: anywhere; }
.detail-side p { margin: 4px 0; }
.internal-access td { color: var(--muted); }

.detail-layout.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.detail-title { margin: 0 0 8px; font-size: 22px; line-height: 1.3; letter-spacing: -0.015em; }
.detail-layout.three .aside-box > p { margin: 0 0 16px; }

/* aktuálny stav článku: farba bloku, štítok, súhrn čísla */
:root { --b-typeset: var(--c-work); --b-prepared: var(--c-wait); --b-proof: var(--c-proof); --b-proofed: var(--c-fix);
  --b-rounds: var(--c-author); --b-overdue: #6E8B1E; --b-approved: #1E8A4C; }  /* považované za schválené (deadline uplynul) = olivová zelená */
@media (prefers-color-scheme: dark) { :root { --b-overdue: #B5CF5A; --b-approved: #5BD08C; } }
.b-typeset { --b: var(--b-typeset); } .b-prepared { --b: var(--b-prepared); } .b-proof { --b: var(--b-proof); }
.b-proofed { --b: var(--b-proofed); } .b-rounds { --b: var(--b-rounds); } .b-overdue { --b: var(--b-overdue); } .b-approved { --b: var(--b-approved); }
.st-typeset { --b: var(--b-typeset); } .st-prepared { --b: var(--b-prepared); } .st-proof { --b: var(--b-proof); }
.st-proofed { --b: var(--b-proofed); } .st-rounds { --b: var(--b-rounds); } .st-overdue { --b: var(--b-overdue); } .st-approved { --b: var(--b-approved); }
.article-table tbody.article > tr > td:first-child { box-shadow: inset 4px 0 0 var(--b, transparent); }
.article-table tbody.article .art-head td, .article-table tbody.article .timeline-row td { box-shadow: inset 4px 0 0 var(--b, transparent); }
.article-table tbody.article td { padding-left: 16px; }
.st-chip { flex: none; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; background: var(--b); }
.issue-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 12px; }
.summary-bar { flex: 1 1 240px; max-width: 520px; display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--line); gap: 2px; }
.summary-bar span { display: block; background: var(--b); }
.summary-counts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--body); }
.b-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--b); margin-right: 5px; }
.detail-article { box-shadow: inset 4px 0 0 var(--b); padding-left: 24px; }
.detail-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

/* míľniky v farbách stavov: schválené = zelená */
.c-approved { color: var(--b-approved); }
.phase-approved { background: var(--b-approved); }

/* nahrávanie súborov v internej sekcii */
.inline-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 4px; }
.inline-upload input[type=file], .form input[type=file] { font: inherit; font-size: 13px; max-width: 100%; height: auto; padding: 6px 0; border: 0; }
.flash { margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--chip); color: var(--chip-fg); font-size: 14px; }
.issue-input { font: inherit; height: 40px; width: 140px; padding: 0 10px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--surface); color: var(--fg); }
.proof-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0; }
.proof-form input[type=file] { font: inherit; font-size: 13px; max-width: 100%; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--body); }

/* vrátenie jazykovej korektúry: dva kroky */
.proof-steps { display: flex; flex-direction: column; gap: 10px; min-width: 260px; }
.proof-step { display: flex; flex-direction: column; gap: 4px; }
.proof-step + .proof-step { padding-top: 10px; border-top: 1px dashed var(--line); }
.step-label { font-size: 13px; }
.step-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.step-row input[type=file] { font: inherit; font-size: 13px; max-width: 100%; }
.btn-done { background: var(--b-approved); }
.btn-done:hover { background: var(--b-approved); filter: brightness(0.92); }

/* spojnica od predchádzajúceho míľnika vo farbe nasledujúceho */
.axis .seg { position: absolute; top: 50%; height: 2px; transform: translateY(-50%); border-radius: 1px; }
.axis .dot { z-index: 1; }

/* kolá s redakciou (číslo) */
.form textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--surface); color: var(--fg); resize: vertical; }
.form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form .form-actions .btn { margin-top: 8px; }
.chip-print { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--chip); color: var(--chip-fg); font-size: 12px; }
.response { margin: 8px 0 0 12px; padding: 4px 0 4px 12px; border-left: 3px solid var(--b-rounds); }
.response-ok { border-left-color: var(--b-approved); }
.response p { margin: 0; }
.response-note { white-space: pre-line; margin-top: 4px !important; }
.section-head .issue-final { font-size: 14px; }
