/* =========================================================
   Sliby PRO PYŠELY — stylopis
   Vychází z webu PRO PYŠELY: žlutá + černá, bez zaoblení a stínů.
   Po změně zvyšte ASSET_VERSION v src/config.ts.
   ========================================================= */

:root {
  --yellow: #FFC61A;
  --ink: #0B0B0B;
  --ink-panel: #141414;
  --ink-line: #2B2B2B;
  --paper: #F5F3EE;
  --paper-alt: #EEEAE1;
  --white: #FFFFFF;
  --line: #E2DDD1;
  --line-input: #CFC8B8;
  --text-body: #4A463E;
  --text-muted: #6F6859;
  --on-dark: #B9B3A6;
  --on-yellow: #4A3A00;
  --olive: #776928;

  --st-done: #1E7B3C;
  --st-partial: #5E8C2A;
  --st-progress: #FFC61A;
  --st-none: #CFC8B8;
  --st-failed: #B3261E;

  --head: Archivo, "Helvetica Neue", Arial, sans-serif;
  --body: Barlow, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 44px);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
p { text-wrap: pretty; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--yellow); color: var(--ink); padding: 10px 14px; z-index: 50; font-weight: 700; }
.skip:focus { left: 16px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-family: var(--head); font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--yellow); flex: none; }
.eyebrow--dark { color: var(--olive); }
h1, h2, h3 { font-family: var(--head); font-weight: 900; text-transform: uppercase; line-height: .95; margin: 0; letter-spacing: -.01em; }
.hl { color: var(--yellow); }

/* ---------- Hlavička ---------- */

.header { background: var(--ink); border-bottom: 1px solid var(--ink-line); position: sticky; top: 0; z-index: 10; }
.header__bar { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lockup { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.lockup img { height: 38px; width: auto; }
.lockup__tag { font-family: var(--head); font-weight: 800; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background: var(--yellow); padding: 4px 8px; white-space: nowrap; }
/* Menu stejně jako na webu PRO PYŠELY: bílé, po najetí žluté, aktivní žluté s linkou. */
.nav { display: flex; gap: clamp(18px, 2.4vw, 34px); align-items: center; }
.nav a { position: relative; padding: 6px 0; font: 700 14px/1 var(--head); letter-spacing: .06em; text-transform: uppercase; color: var(--white); text-decoration: none; white-space: nowrap; transition: color 140ms ease; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--yellow); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--yellow); }
@media (max-width: 760px) {
  .header__bar { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  .lockup img { height: 30px; }
  .nav { width: 100%; gap: 20px; overflow-x: auto; padding-bottom: 6px; }
  .nav a { font-size: 13px; }
}

/* ---------- Hero ---------- */

.hero { background: var(--ink); color: var(--white); padding: clamp(48px, 7vw, 92px) 0 clamp(44px, 6vw, 80px); }
/* Levý sloupec nesmí být užší než nejdelší slovo nadpisu, jinak ho přeteče. */
.hero__grid { display: grid; grid-template-columns: minmax(min-content, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.hero h1 { font-size: clamp(44px, 7.4vw, 96px); }
.hero__lead { color: var(--on-dark); font-size: 18px; margin: 0; max-width: 46ch; }
.hero__lead strong { color: var(--yellow); font-weight: 600; }
@media (max-width: 1024px) { .hero__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Souhrn plnění ---------- */

.summary { margin-top: clamp(36px, 5vw, 60px); border: 1px solid var(--ink-line); background: var(--ink-panel); padding: clamp(20px, 3vw, 32px); }
.summary__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.summary__big { font-family: var(--head); font-weight: 900; font-size: clamp(40px, 5vw, 60px); line-height: 1; color: var(--yellow); }
.summary__big small { font-size: .38em; color: var(--on-dark); font-weight: 700; margin-left: 8px; letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 640px) { .summary__big small { display: block; margin: 10px 0 0; } }
.summary__term { font-family: var(--head); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark); }
.bar { display: flex; height: 16px; background: #222; }
.bar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 16px; }
.legend a { color: var(--white); display: flex; align-items: center; gap: 9px; font-size: 15px; text-decoration: none; }
.legend a:hover .legend__label { text-decoration: underline; }
.legend i { width: 12px; height: 12px; display: inline-block; }
.legend b { font-family: var(--head); font-weight: 800; }
.legend__label { color: var(--on-dark); }

/* ---------- Štítek stavu ---------- */

.st { display: inline-flex; align-items: center; gap: 7px; font-family: var(--head); font-weight: 800; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; white-space: nowrap; line-height: 1.2; }
.st::before { content: ""; width: 8px; height: 8px; background: currentColor; }
.st--done { background: var(--st-done); color: var(--white); }
.st--partial { background: var(--st-partial); color: var(--white); }
.st--progress { background: var(--yellow); color: var(--ink); }
.st--none { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--st-none); }
.st--failed { background: var(--st-failed); color: var(--white); }
.dhero .st--none, .summary .st--none { color: var(--on-dark); box-shadow: inset 0 0 0 1px var(--ink-line); }

/* ---------- Sekce ---------- */

.section { padding: clamp(52px, 7vw, 96px) 0; }
.section--alt { background: var(--paper-alt); }
.section--tight { padding: clamp(28px, 4vw, 48px) 0 clamp(52px, 7vw, 96px); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.section__head h2 { font-size: clamp(30px, 4vw, 48px); }

/* ---------- Filtr ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--ink); padding: 7px 12px; font-family: var(--head); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.chip[aria-current] { background: var(--ink); color: var(--yellow); }
.chip:hover { background: var(--ink); color: var(--white); }

/* ---------- Seznam slibů ---------- */

.list { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: 120px 1fr; background: var(--white); border: 1px solid var(--line); text-decoration: none; transition: border-color 140ms ease; }
.row:hover { border-color: var(--ink); }
.row__num { font-family: var(--head); font-weight: 900; font-size: 54px; line-height: 1; padding: 22px 24px; }
.row--odd .row__num { background: var(--yellow); color: var(--ink); }
.row--even .row__num { background: var(--ink); color: var(--yellow); }
.row__body { padding: 22px 26px; display: grid; gap: 10px; min-width: 0; }
.row__top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.row__title { font-weight: 800; font-size: clamp(18px, 2vw, 22px); line-height: 1.1; letter-spacing: 0; }
.row__tier { font-size: 12px; color: var(--text-muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; }
.row__last { color: var(--text-body); font-size: 15px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row__last time { font-weight: 700; color: var(--ink); margin-right: 6px; }
.row__meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--text-muted); font-weight: 600; }
.mini { flex: 0 0 140px; display: flex; gap: 3px; }
.mini span { height: 6px; flex: 1; background: var(--line); }
.mini span.half { background: linear-gradient(90deg, var(--ink) 50%, var(--line) 50%); }
.mini span.on { background: var(--ink); }
@media (max-width: 640px) {
  .row { grid-template-columns: 64px 1fr; }
  .row__num { font-size: 32px; padding: 16px 14px; }
  .row__body { padding: 16px; }
  .row__top { flex-direction: column; gap: 8px; }
  .row__meta { align-items: flex-start; flex-direction: column; gap: 6px; }
  .mini { flex-basis: auto; width: 110px; }
}
.empty { padding: 40px; text-align: center; color: var(--text-muted); border: 1px dashed var(--line-input); }

/* ---------- Novinky ---------- */

.feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feed a { background: var(--white); border: 1px solid var(--line); padding: 22px; text-decoration: none; display: grid; gap: 10px; align-content: start; }
.feed a:hover { border-color: var(--ink); }
.feed time { font-family: var(--head); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--olive); }
.feed h3 { font-size: 17px; font-weight: 800; line-height: 1.15; text-transform: none; letter-spacing: 0; }
.feed p { margin: 0; font-size: 15px; color: var(--text-body); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feed__slib { font-size: 13px; color: var(--text-muted); font-weight: 600; }
@media (max-width: 860px) { .feed { grid-template-columns: 1fr; } }

/* ---------- Detail slibu ---------- */

.dhero { background: var(--ink); color: var(--white); padding: clamp(40px, 6vw, 80px) 0; }
.back { display: inline-flex; gap: 8px; color: var(--on-dark); font-family: var(--head); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; margin-bottom: 26px; }
.back:hover { color: var(--yellow); }
.dhero__grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
.dhero__num { font-family: var(--head); font-weight: 900; font-size: clamp(72px, 10vw, 140px); line-height: .8; color: var(--yellow); }
.dhero h1 { font-size: clamp(32px, 5vw, 64px); margin-bottom: 18px; }
.dhero__summary { color: var(--on-dark); font-size: 18px; margin: 0 0 22px; max-width: 60ch; }
.dhero__facts { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; font-size: 14px; color: var(--on-dark); }
.dhero__facts b { color: var(--white); font-weight: 600; }
@media (max-width: 640px) { .dhero__grid { grid-template-columns: 1fr; } }

.detail { display: grid; grid-template-columns: 380px 1fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
.detail > * { min-width: 0; }
@media (max-width: 900px) { .detail { grid-template-columns: minmax(0, 1fr); } }
.detail__h { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 30px; }
.promise { background: var(--white); border: 1px solid var(--line); position: sticky; top: 96px; }
@media (max-width: 900px) { .promise { position: static; } }
.promise__head { padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.promise__head h2 { font-size: 20px; }
.promise__lock { font-size: 13px; color: var(--text-muted); margin: 8px 0 0; }
.promise ul { list-style: none; margin: 0; padding: 8px 0; }
.promise li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 12px 24px; font-size: 15px; color: var(--text-body); }
.promise li small { display: block; color: var(--text-muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
.promise__src { padding: 14px 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-muted); background: var(--paper); }
.tick { width: 20px; height: 20px; border: 2px solid var(--st-none); display: grid; place-items: center; margin-top: 2px; font-size: 13px; font-weight: 900; line-height: 1; }
.tick--done { background: var(--st-done); border-color: var(--st-done); color: var(--white); }
.tick--progress { border-color: var(--ink); background: linear-gradient(90deg, var(--yellow) 50%, transparent 50%); }

.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl { position: relative; padding: 0 0 34px 38px; scroll-margin-top: 100px; }
.tl::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; background: var(--paper); border: 3px solid var(--ink); }
.tl--status::before { background: var(--yellow); }
.tl--start::before { background: var(--ink); }
.tl:target h3 { background: linear-gradient(transparent 60%, rgba(255, 198, 26, .5) 60%); }
.tl__date { font-family: var(--head); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--olive); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tl__type { color: var(--text-muted); font-weight: 700; }
.tl h3 { font-size: 20px; font-weight: 800; line-height: 1.15; margin: 8px 0; text-transform: none; letter-spacing: 0; }
.tl p { margin: 0 0 10px; color: var(--text-body); }
.tl__change { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-muted); margin-top: 6px; flex-wrap: wrap; }
.tl__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tl__links a { font-size: 13px; font-weight: 600; border: 1px solid var(--ink); padding: 5px 10px; text-decoration: none; overflow-wrap: anywhere; }
.tl__links a:hover { background: var(--ink); color: var(--yellow); }
.tl__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; max-width: 620px; }
.tl__photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-alt); }
.tl__photos a:hover img { opacity: .85; }

/* ---------- Výzva ---------- */

.cta { background: var(--yellow); padding: clamp(40px, 6vw, 72px) 0; }
.cta__grid { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(26px, 3.6vw, 42px); }
.cta p { margin: 10px 0 0; color: var(--on-yellow); max-width: 56ch; }

.btn { display: inline-block; background: var(--ink); color: var(--white); font-family: var(--head); font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; padding: 15px 22px; text-decoration: none; border: 0; cursor: pointer; border-radius: 0; }
.btn:hover { background: #262626; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--danger { background: transparent; color: var(--st-failed); box-shadow: inset 0 0 0 2px var(--st-failed); }
.btn--danger:hover { background: var(--st-failed); color: var(--white); }

/* ---------- Jak hodnotíme ---------- */

.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rule { background: var(--white); border: 1px solid var(--line); padding: 26px; }
.rule h3 { font-size: 18px; font-weight: 800; margin: 12px 0 8px; line-height: 1.15; }
.rule p { margin: 0; color: var(--text-body); font-size: 16px; }
.statuses { display: grid; gap: 10px; }
.status-row { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: center; background: var(--white); border: 1px solid var(--line); padding: 18px 22px; }
.status-row p { margin: 0; color: var(--text-body); }
@media (max-width: 700px) { .rules { grid-template-columns: 1fr; } .status-row { grid-template-columns: 1fr; gap: 10px; } .status-row .st { justify-self: start; } }

/* ---------- Patička ---------- */

.footer { background: var(--ink); color: var(--on-dark); padding: 44px 0 30px; font-size: 14px; }
.footer__grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer img { height: 32px; width: auto; margin-bottom: 14px; }
.footer__about { max-width: 40ch; margin: 0; }
.footer a { color: var(--white); text-decoration: none; }
.footer a:hover { color: var(--yellow); }
.footer__links { display: grid; gap: 6px; align-content: start; }
.footer__h { font-family: var(--head); font-weight: 800; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); margin-bottom: 6px; }
.footer__bottom { border-top: 1px solid var(--ink-line); margin-top: 30px; padding-top: 18px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* =========================================================
   Administrace
   ========================================================= */

.dhero--admin { padding: clamp(28px, 4vw, 48px) 0; }
.admin__h1 { font-size: clamp(30px, 4.4vw, 52px); }
.admin__lead { margin: 12px 0 0; font-size: 15px; }
.admin__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.admin__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: start; }
.admin__grid > div { display: grid; gap: 20px; align-content: start; }
.admin__narrow { max-width: 760px; }
@media (max-width: 900px) { .admin__grid { grid-template-columns: 1fr; } }

.panel { background: var(--white); border: 1px solid var(--line); min-width: 0; }
.panel__head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel__head h2 { font-size: 16px; font-weight: 800; }
.panel__count { font-family: var(--head); font-weight: 800; font-size: 13px; color: var(--text-muted); }
.panel__body { padding: 20px; display: grid; gap: 16px; border: 0; margin: 0; min-width: 0; }
.panel__empty { padding: 20px; margin: 0; color: var(--text-muted); }

.flash { padding: 14px 18px; margin-bottom: 20px; font-weight: 600; border-left: 4px solid; }
.flash--ok { background: #E6F2E9; border-color: var(--st-done); }
.flash--err { background: #F8E5E3; border-color: var(--st-failed); font-weight: 400; }
.flash--err ul { margin: 6px 0 0; padding-left: 20px; }

label.f, .f { display: grid; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.f input, .f select, .f textarea { border: 1px solid var(--line-input); background: var(--white); padding: 11px 12px; font-size: 16px; color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 400; border-radius: 0; width: 100%; }
.f input[type="file"] { padding: 10px; background: var(--paper); }
.f textarea { resize: vertical; line-height: 1.5; }
.f input:focus, .f select:focus, .f textarea:focus { outline: 2px solid var(--yellow); outline-offset: 0; border-color: var(--ink); }
.f--point textarea { font-size: 15px; }
fieldset:disabled .f input, fieldset:disabled .f select, fieldset:disabled .f textarea { background: var(--paper); color: var(--text-body); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.hint { font-size: 13px; color: var(--text-muted); margin: -6px 0 0; }
.hint--lock { margin: 0; padding: 10px 12px; background: var(--paper); border-left: 3px solid var(--yellow); color: var(--text-body); }
.form__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

.checks { display: grid; gap: 10px; border: 0; padding: 0; margin: 10px 0 0; min-width: 0; }
.checks label { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; font-size: 15px; color: var(--text-body); }
.checks__n { font-family: var(--head); font-weight: 900; }
.checks select { font-size: 14px; padding: 5px 6px; border: 1px solid var(--line-input); border-radius: 0; background: var(--white); }
@media (max-width: 520px) { .checks label { grid-template-columns: auto 1fr; } .checks select { grid-column: 2; justify-self: start; } }

.atable { width: 100%; border-collapse: collapse; font-size: 15px; }
.atable td { padding: 12px 20px; border-top: 1px solid var(--line); vertical-align: top; }
.atable__num { font-family: var(--head); font-weight: 900; width: 44px; padding-right: 0 !important; }
.atable__title { font-weight: 600; text-decoration: none; }
.atable__title:hover { text-decoration: underline; }
.atable__meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--text-muted); }
.atable__right { text-align: right; color: var(--text-muted); font-size: 13px; white-space: nowrap; display: grid; gap: 6px; justify-items: end; }
.atable__add { font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--yellow); }
@media (max-width: 520px) { .atable td { padding: 12px; } }

.alist { list-style: none; margin: 0; padding: 0; }
.alist li + li { border-top: 1px solid var(--line); }
.alist a { display: grid; gap: 2px; padding: 12px 20px; text-decoration: none; }
.alist a:hover { background: var(--paper); }
.alist__date { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.alist__title { font-weight: 600; }

.aphotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; text-transform: none; letter-spacing: 0; }
.aphotos figure { margin: 0; position: relative; }
.aphotos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.aphotos__del { position: absolute; right: 4px; bottom: 4px; background: var(--ink); color: var(--white); border: 0; font-size: 12px; font-weight: 700; padding: 4px 8px; cursor: pointer; }
.aphotos__del:hover { background: var(--st-failed); }
