:root {
    color-scheme: light dark;

    --stena: #dbe8e1;
    --nitro: #f1f7f3;
    --inkoust: #12332d;
    --ticha: #3a5750;
    --zila: #24479a;
    --tepna: #a82a20;
    --pasmo: #12332d;
    --pasmo-text: #e6f1ec;
    --pasmo-ticha: #b4cbc3;

    --serif: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif;
    --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
    --sirka: 76rem;
    --okraj: clamp(1.25rem, 4vw, 3rem);
}

@media (prefers-color-scheme: dark) {
    :root {
        --stena: #0f2a26;
        --nitro: #173a34;
        --inkoust: #e3efe9;
        --ticha: #a9c4bb;
        --zila: #a9c0f5;
        --tepna: #f4a198;
        --pasmo: #1a433c;
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--stena);
    color: var(--inkoust);
    font-family: var(--serif);
    font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
    line-height: 1.65;
}

h1,
h2 {
    margin: 0;
    font-weight: 400;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.3rem, 4.5vw, 3.75rem);
    line-height: 1.09;
    letter-spacing: -0.012em;
}

h2 {
    font-size: clamp(1.45rem, 2.2vw, 1.8rem);
    line-height: 1.2;
}

p {
    margin: 0;
}

a {
    color: var(--zila);
    text-underline-offset: 0.16em;
}

code,
pre {
    font-family: var(--mono);
    font-size: 0.86em;
}

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

.preskocit {
    position: absolute;
    left: -100vw;
}

.preskocit:focus {
    left: var(--okraj);
    top: 0.5rem;
    z-index: 1;
    padding: 0.4rem 0.8rem;
    background: var(--nitro);
}

/* Hlavička */

.hlavicka {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    max-width: var(--sirka);
    margin: 0 auto;
    padding: 1.25rem var(--okraj);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: inherit;
    font-size: 1.35rem;
    letter-spacing: 0.005em;
    text-decoration: none;
}

.logo-obrys {
    stroke: var(--inkoust);
}

.logo-nitro {
    stroke: var(--nitro);
}

.logo-uzel {
    stroke: var(--tepna);
}

.hlavicka nav {
    display: flex;
    gap: 1.5rem;
}

.hlavicka nav a {
    color: inherit;
}

/* Úvodní stránka */

.titul {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    grid-template-areas:
        "uvod tabule"
        "klic tabule";
    grid-template-rows: auto 1fr;
    gap: 2.75rem clamp(2rem, 6vw, 6rem);
    max-width: var(--sirka);
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3.5rem) var(--okraj) clamp(3rem, 6vw, 5rem);
}

.uvod {
    grid-area: uvod;
}

.uvod p {
    max-width: 34rem;
    margin-top: 1.35rem;
    font-size: 1.15em;
    color: var(--ticha);
}

.tabule {
    grid-area: tabule;
    margin: 0;
}

.tabule svg {
    display: block;
    width: 100%;
    height: auto;
}

.tabule figcaption {
    max-width: 30rem;
    margin-top: 0.75rem;
    color: var(--ticha);
    font-size: 0.92em;
    font-style: italic;
    line-height: 1.5;
}

.obrys {
    stroke: var(--inkoust);
}

.nitro {
    stroke: var(--nitro);
}

.pozadavky {
    stroke: var(--zila);
}

.putujici {
    fill: var(--tepna);
}

.neprecteno {
    stroke: var(--ticha);
}

.uzel {
    stroke: var(--tepna);
}

.stranky {
    stroke: var(--inkoust);
    stroke-width: 1.5;
}

.list-papir {
    fill: var(--nitro);
}

.soubor {
    stroke-width: 0.8;
}

.duch {
    stroke: var(--ticha);
    stroke-dasharray: 2.5 3;
}

.duch .list-papir {
    fill: none;
}

.vodice {
    stroke: var(--inkoust);
}

.pismena {
    fill: var(--inkoust);
    font-size: 30px;
    font-style: italic;
}

.klic {
    grid-area: klic;
}

.klic dl {
    margin: 1rem 0 1.5rem;
}

.klic dl > div {
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr);
    padding: 0.4rem 0;
}

.klic dt {
    font-size: 1.25em;
    font-style: italic;
    line-height: 1.32;
}

.klic dd {
    max-width: 32rem;
    margin: 0;
}

/* Pásmo s odmítnutím */

.pasmo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem clamp(2rem, 6vw, 6rem);
    padding: clamp(2.5rem, 5vw, 4rem) max(var(--okraj), calc((100% - var(--sirka)) / 2 + var(--okraj)));
    background: var(--pasmo);
    color: var(--pasmo-text);
}

.pasmo p {
    max-width: 30rem;
    margin-top: 0.75rem;
}

.pasmo code {
    color: inherit;
}

.pasmo pre {
    margin: 1rem 0 0;
    padding-left: 1rem;
    border-left: 3px solid var(--pasmo-ticha);
    overflow-x: auto;
    line-height: 1.5;
}

.pasmo pre code {
    font-size: 1em;
}

.pasmo .tlacitko {
    margin-top: 1.25rem;
    background: var(--pasmo-text);
    color: #12332d;
}

.pasmo :focus-visible {
    outline-color: var(--pasmo-text);
}

/* Tlačítko */

.tlacitko {
    display: inline-block;
    padding: 0.6rem 1.35rem 0.65rem;
    border: 0;
    border-radius: 2px;
    background: var(--inkoust);
    color: var(--stena);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.tlacitko:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* Kontakt */

.kontakt {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 2rem clamp(2rem, 6vw, 6rem);
    max-width: var(--sirka);
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3.5rem) var(--okraj) clamp(3rem, 6vw, 5rem);
}

.kontakt-uvod p {
    margin-top: 1.25rem;
    max-width: 26rem;
    color: var(--ticha);
}

.kontakt-obsah {
    max-width: 36rem;
}

form {
    display: grid;
    gap: 1.35rem;
    justify-items: start;
}

fieldset {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
}

legend,
.pole label {
    padding: 0;
    margin-bottom: 0.3rem;
    display: block;
}

.pole {
    width: 100%;
}

.pole label span {
    color: var(--ticha);
}

.volba {
    display: flex;
    gap: 0.55rem;
    align-items: baseline;
}

input[type="radio"] {
    margin: 0;
    accent-color: var(--inkoust);
}

input:not([type="radio"]),
textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--inkoust);
    border-radius: 2px;
    background: var(--nitro);
    color: inherit;
    font: inherit;
}

textarea {
    resize: vertical;
}

[aria-invalid="true"] {
    border-color: var(--tepna);
}

.chyba {
    margin-top: 0.3rem;
    color: var(--tepna);
}

.hlaseni {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--zila);
}

.hlaseni-chyba {
    border-left-color: var(--tepna);
}

.cf-turnstile {
    min-height: 65px;
}

.past {
    position: absolute;
    left: -100vw;
}

.poznamka {
    margin-top: 1.75rem;
    color: var(--ticha);
    font-size: 0.9em;
    line-height: 1.55;
}

/* Patička */

.paticka {
    max-width: var(--sirka);
    margin: 0 auto;
    padding: 2rem var(--okraj) 2.5rem;
    color: var(--ticha);
    font-size: 0.92em;
}

.paticka p {
    max-width: 40rem;
}

@media (max-width: 56rem) {
    .titul {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas:
            "uvod"
            "tabule"
            "klic";
    }

    .pasmo,
    .kontakt {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .putujici {
        display: none;
    }
}
