:root{
    --bg:#fff;
    --text:#111;
    --muted:#666;
    --line: #006443;
    --chip:#f4f4f4;
    --panel:#fafafa;
    --accent:#1e6fff;
    --radius:10px;
    --shadow:0 8px 24px rgba(0,0,0,.06);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
    margin:0;
    font-family:"Nunito", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background:var(--bg);
    color:var(--text);
}

.container{
    max-width:980px;
    margin:0 auto;
    padding:0 16px;
}

.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 */
.header{
    border-bottom:1px solid var(--line);
    background-color: var(--line);
    padding:22px 0 14px;
}
.meta{
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
    color:var(--muted);
    font-size:13px;
    letter-spacing:.02em;
}
.brand{ font-weight:800;color:white; }
.dot{ color:#bbb; }
.meta #helpBtn{ margin-left:auto; }

.headline-row{ margin-top:10px; }
.headline{
    color: white;
    margin:0;
    font-size:28px;
    line-height:1.15;
    font-weight:800;
}
.subtitle{
    margin:8px 0 20px 0 ;
    color: #d5d5d5;
    font-size:14px;
    max-width:75ch;
}

/* Main */
.main{ padding:18px 16px 64px; }

/* čisté ikony bez rámečku */
.icon-btn{
    border:none;
    background:transparent;
    color:var(--muted);
    width:38px;
    height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    padding:0;
}
.icon-btn:hover{ color:var(--text); }
.icon-btn svg{ width:26px;height:26px; fill:white; }

/* Search */
.search{ margin: 0 0 10px; }

.search-wrap{
    position: relative;
    width: 100%;
}

.search-wrap input{
    width:100%;
    padding:14px 44px 14px 16px;
    font-size:18px;
    border:1px solid var(--line);
    border-radius:var(--radius);
    outline:none;
    background:#fff;
}
.search-wrap input:focus{ border-color:var(--accent); }

.search-clear{
    position:absolute;
    right:10px;
    top:50%;
    transform: translateY(-50%);
    border:none;
    background:transparent;
    width:32px;
    height:32px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0;
    cursor:pointer;
    color: var(--muted);
}
.search-clear:hover{ color: var(--text); }
.search-clear svg{ width:18px;height:18px; fill: currentColor; }

/* Results */
.section-head{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:12px;
    margin:18px 0 10px;
}
.section-head h2{
    margin:0;
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:var(--muted);
    font-weight:700;
}
.small{ font-size:12px; }
.muted{ color:var(--muted); }

.list{ border-top:1px solid var(--line); }
.item{
    padding:14px 0;
    border-bottom:1px solid var(--line);
}

/* HLAVNÍ ŘÁDEK: text vlevo, ikona vpravo */
.item-head{
    display:flex;
    align-items:stretch;
    gap:14px;
    cursor:pointer;
}

/* barevný proužek vlevo (šířka 8px, výška jako hlavička položky) */
.item-colorbar{
    width:8px;
    flex: 0 0 8px;
    background: transparent;
    align-self:stretch;
}
.item-head:focus-visible{
    outline:2px solid var(--accent);
    outline-offset:6px;
    border-radius:8px;
}

/* textový blok – cíleně „nejvýš 80 %“, zbytek je pro ikonu */
.item-text{
    flex: 1 1 auto;
    min-width:0;
    max-width:80%;
}
@media (max-width: 760px){
    .item-text{ max-width:100%; }
}

.item-title{
    font-size:18px;
    font-weight:700;
    margin:0;
    word-break:break-word;
}
.item-summary{
    margin:6px 0 0;
    font-size:14px;
    color:var(--muted);
}

/* pravý sloupec s ikonou */
.item-right{
    align-self:flex-start;
    margin-left:auto;
    width:38px;
    height:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--line);
    flex: 0 0 auto;
    border-radius:10px;
}
.item-right svg{ width:20px;height:20px; fill:currentColor; }
.item-head:hover .item-right{ color:var(--text); background:rgba(0,0,0,.03); }

/* detail */
.detail{
    margin-top:10px;
    padding:14px;
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:var(--radius);
    display:none;
}
.detail.active{ display:block; }
.detail h3{
    margin:14px 0 6px;
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.06em;
    color:#444;
}
.detail h3:first-child{ margin-top:0; }
.detail p{ margin:0 0 8px;font-size:14px; }
.detail ul{ margin:0 0 8px 18px;font-size:14px; }

.links{
    margin-top:10px;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
.link{
    color:var(--accent);
    text-decoration:none;
    font-size:14px;
}
.link:hover{ text-decoration:underline; }

/* Empty */
.empty{ padding:18px 0; }
.empty h3{ margin:0 0 6px;font-size:16px; }
.empty p{ margin:0;color:var(--muted);max-width:70ch; }

/* Footer */
.footer{
    border-top:1px solid var(--line);
    padding:14px 0;
    color:var(--muted);
    font-size:12px;
}
.footer-inner{
    display:flex;
    justify-content:space-between;
    gap:10px;
    flex-wrap:wrap;
}

/* Dialog */
.dialog{
    border:none;
    border-radius:14px;
    padding:0;
    width:min(680px, calc(100% - 24px));
    box-shadow:var(--shadow);
}
.dialog::backdrop{ background:rgba(0,0,0,.35); }
.dialog-inner{ padding:16px; }
.dialog-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
}
.dialog-head h3{ margin:0;font-size:16px; }
.dialog-body p{ margin:10px 0; }