:root {
    --bg-main: #ffffff;
    --border-main: #dfe1e5;
    --text-main: #202124;
    --text-secondary: #4d5156;
    --text-muted: #70757a;
    --accent-primary: #1a73e8;
    --link: #1a0dab;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: Arial, Helvetica, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

/* Two states of one page: empty query = brand and input centred (landing), otherwise the brand moves
   next to the input and the tab strip appears. `.has-results` is toggled from hledej.ts. */
/* One width for the whole page — header, tabs and results. The snippets are short, so a narrow
   measure reads better than a wide one, and nothing sticks out past anything else. */
.shell {
    max-width: 720px;
    margin: 0 auto;
    padding: 17vh 24px 60px;
}

.shell.has-results { padding-top: 18px; }

.head-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* The brand stays ABOVE the box in both states — only smaller and left-aligned once results show. */
.shell.has-results .head-row {
    align-items: flex-start;
    gap: 12px;
}

/* The full name is long, so the landing heading wraps instead of overflowing the 720px column. */
.brand {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -.6px;
    text-align: center;
    line-height: 1.2;
}

.shell.has-results .brand { font-size: 22px; letter-spacing: -.3px; text-align: left; }

.brand a { color: var(--accent-primary); text-decoration: none; }
.brand a:hover { text-decoration: underline; }
.brand-sep { color: var(--text-muted); font-weight: 400; margin: 0 7px; }

.search-box { position: relative; width: 100%; }
.shell.has-results .search-box { flex: 1; min-width: 0; }

.search-box input {
    width: 100%;
    font-size: 16px;
    font-family: inherit;
    padding: 11px 18px;
    border: 1px solid var(--border-main);
    border-radius: 24px;
    outline: none;
}

.search-box input:hover,
.search-box input:focus {
    border-color: rgba(223,225,229,0);
    box-shadow: 0 1px 6px rgba(32,33,36,.28);
}

.examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

.shell.has-results .examples { display: none; }

.example {
    font: inherit;
    font-size: 13px;
    color: var(--text-secondary);
    background: #f8f9fa;
    border: 1px solid #f1f3f4;
    border-radius: 18px;
    padding: 7px 15px;
    cursor: pointer;
}

.example:hover { border-color: #dadce0; box-shadow: 0 1px 3px rgba(60,64,67,.15); }

/* Category tabs. No horizontal scrollbar: what does not fit hides behind »více« and wraps below. */
.tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    margin-top: 16px;
    border-bottom: 1px solid #ebebeb;
}

.tabs:empty { display: none; }
.tabs.expanded { flex-wrap: wrap; }

.tab, .more {
    font: inherit;
    font-size: 13px;
    color: #5f6368;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0 12px 12px;
    cursor: pointer;
    white-space: nowrap;
}

.tab:hover, .more:hover { color: var(--text-main); }

.tab.on {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    font-weight: 600;
}

.tab.zero { color: #bdc1c6; }

.tab-n { font-size: 11px; color: #9aa0a6; margin-left: 5px; }
.tab.on .tab-n { color: #7cb0f5; }

.status {
    color: var(--text-muted);
    font-size: 13px;
    margin: 14px 0 4px;
    min-height: 16px;
}

.results { margin-top: 6px; }

.result {
    display: block;
    margin-bottom: 26px;
    text-decoration: none;
    color: inherit;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    line-height: 20px;
}

.crumb {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
}

.crumb.muted { color: #9aa0a6; }
.crumb-sep { color: #9aa0a6; font-size: 12px; }

.result-title {
    font-size: 20px;
    line-height: 26px;
    font-weight: 400;
    color: var(--link);
    margin: 2px 0 3px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.result:hover .result-title { text-decoration: underline; }

.score { font-size: 12px; font-weight: 400; color: #9aa0a6; white-space: nowrap; }

.result-snippet {
    font-size: 14px;
    line-height: 22px;
    color: var(--text-secondary);
}

.chip {
    display: inline-block;
    font-size: 12px;
    border: 1px solid #dadce0;
    background: #f8f9fa;
    color: var(--text-secondary);
    border-radius: 20px;
    padding: 3px 10px;
    margin: 2px 6px 2px 0;
}

/* The document page is served by /nclp/repslp/<id> (RestApi.cs ComposeRepslpPage) and carries its
   own scoped .dochdr-* styles — a document is a whole Word HTML page, so it cannot inherit this
   stylesheet's reset without reflowing. */
