/* Self-hosted: survives offline in the PWA, and keeps the stamp's textPath
   metrics stable — the circular legend is sized against Tinos. latin-ext is
   required for Czech diacritics (ř ě ů č š ž). */
@font-face {
  font-family: 'Roboto'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('fonts/roboto-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('fonts/roboto-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Tinos'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/tinos-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Tinos'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/tinos-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Tinos'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/tinos-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Tinos'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/tinos-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Tinos'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('fonts/tinos-400i-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Tinos'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('fonts/tinos-400i-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ------------------------------------------------------------------
   Úřad pro udělování zbytečných povolení
   The chrome follows the visual language of the Czech government
   design system as a genre, never a specific authority's identity.
   The certificate (document.gohtml) stays set as an official listina.
------------------------------------------------------------------ */

:root {
  --blue:          #2362a2;
  --blue-dark:     #254e80;
  --blue-light:    #3077b7;
  --blue-pale:     #d3dfec;
  --blue-border:   #91b0d0;
  --grey-panel:    #edf0f2;
  --grey-surface:  #f5f5f5;
  --grey-rule:     #dddddd;
  --grey-border:   #a8a8a8;
  --text:          #3b3b3b;
  --text-muted:    #686868;
  --red:           #c52a3a;
  --amber:         #ecae1a;
  --paper:         #ffffff;
  --radius:        3px;
  --stamp:         #3b2f8f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--grey-surface);
  color: var(--text);
  font: 400 15px/1.6 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

:focus-visible {
  outline: 2px solid var(--blue-dark);
  outline-offset: 2px;
}
/* The default outline is #254e80, which is the top bar's own colour and only
   1.35:1 against the nav — invisible. Amber clears 3:1 on both blues. */
.topbar a:focus-visible,
.nav a:focus-visible,
.number-large a:focus-visible { outline-color: var(--amber); }
.controls a:focus-visible, .controls button:focus-visible { outline-color: #fff; }

/* Skip link: ~17 links precede <main> on every chrome page. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: #fff;
  color: var(--blue-dark);
  padding: 10px 18px;
  font-weight: 500;
  border: 2px solid var(--blue-dark);
  border-radius: var(--radius);
}
.skip:focus { left: 8px; top: 8px; }

.wrapper {
  width: 1240px;
  max-width: 100%;
  margin: 0 auto;
  background: var(--paper);
}

/* ---------- top service bar ---------- */

.topbar {
  background: var(--blue-dark);
  color: #fff;
}
.topbar .content {
  width: 1240px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  min-height: 36px;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar .right { margin-left: auto; display: flex; gap: 18px; }

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
}
.masthead img { width: 52px; height: auto; flex: none; }

.title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--blue-dark);
  letter-spacing: -.01em;
}
.title a { color: inherit; text-decoration: none; }
.title a:hover { color: inherit; text-decoration: underline; }

.subtitle { margin: 2px 0 0; font-size: 14px; color: var(--text-muted); }

.services {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex: none;
}
.services .response { margin: 0; font-size: 12px; color: var(--red); }
.search {
  display: flex;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
}
.search input[type=text] { border-radius: var(--radius) 0 0 var(--radius); }
.search button { border-radius: 0 var(--radius) var(--radius) 0; }
.search input[type=text] {
  border: 0;
  border-radius: 0;
  padding: 8px 12px;
  font: 400 14px 'Roboto', Arial, sans-serif;
  width: 190px;
  max-width: 44vw;
}
.search input[type=text]:focus { background: #fbfcfd; }
.search button {
  border: 0;
  background: var(--blue);
  color: #fff;
  padding: 0 14px;
  font: 500 14px 'Roboto', Arial, sans-serif;
  cursor: pointer;
}
.search button:hover { background: var(--blue-dark); }

/* ---------- navigation ---------- */

.nav {
  display: flex;
  flex-wrap: wrap;
  background: var(--blue);
}
.nav a {
  padding: 13px 18px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav a:hover { background: var(--blue-dark); color: #fff; }
.nav a[aria-current] {
  background: var(--blue-dark);
  border-bottom-color: var(--amber);
}

/* ---------- breadcrumbs ---------- */

.breadcrumbs {
  padding: 16px 24px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.breadcrumbs li + li::before { content: '>'; margin: 0 7px; color: var(--grey-border); }

/* ---------- layout ---------- */

.layout {
  display: grid;
  grid-template-columns: 210px minmax(0,1fr) 260px;
  gap: 24px;
  padding: 20px 24px 44px;
  align-items: start;
}
.layout.narrow { grid-template-columns: 210px minmax(0,1fr); }

h1.page {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--blue-dark);
  letter-spacing: -.015em;
}
.lede {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  max-width: 68ch;
}

/* ---------- panels ---------- */

.panel {
  border: 1px solid var(--grey-rule);
  border-radius: var(--radius);
  background: var(--paper);
  margin-bottom: 24px;
}
.panel > h2, .panel > .heading {
  margin: 0;
  padding: 12px 18px;
  background: var(--grey-panel);
  border-bottom: 1px solid var(--grey-rule);
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--blue-dark);
}
.panel > .inner { padding: 18px; overflow-x: auto; }
.panel p { margin: 0 0 12px; }
.panel p:last-child { margin-bottom: 0; }

/* ---------- side menu ---------- */

.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li:last-child a { border-radius: 0 0 var(--radius) var(--radius); }
.menu li + li { border-top: 1px solid var(--grey-rule); }
.menu a {
  display: block;
  padding: 11px 16px;
  font-size: 15px;
  text-decoration: none;
  border-left: 3px solid transparent;
}
.menu a:hover { background: var(--grey-panel); }
.menu a[aria-current] {
  background: var(--blue-pale);
  border-left-color: var(--blue);
  font-weight: 500;
  color: var(--blue-dark);
}

/* ---------- tables ---------- */

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table caption {
  text-align: left;
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 0 12px;
}
.table th, .table td {
  border-bottom: 1px solid var(--grey-rule);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.table .time { white-space: nowrap; }
.table thead th {
  background: var(--grey-panel);
  border-bottom: 1px solid var(--grey-border);
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 500;
}
.table tbody th { font-weight: 500; }
.table tbody tr:last-child th, .table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover th, .table tbody tr:hover td { background: #fafbfc; }
.table td.num, .table th.num {
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--blue-dark);
  min-width: 78px;
}
.table .non-office { color: var(--text-muted); }
.table .closed { color: var(--red); }

/* ---------- news sidebar ---------- */

.news ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.news li { padding: 13px 18px; }
.news li + li { border-top: 1px solid var(--grey-rule); }
.news .date {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 2px;
}

/* ---------- form ---------- */

.row { padding: 0 0 18px; }
.row > label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 5px; }
.required { color: var(--red); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

input[type=text], input[type=date], select, textarea {
  width: 100%;
  max-width: 420px;
  padding: 9px 12px;
  font: 400 15px 'Roboto', Arial, sans-serif;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
}
textarea { max-width: 100%; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--blue); }
input:disabled { background: var(--grey-panel); color: var(--text-muted); }

.panel .hint, .hint {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 62ch;
}
.hint.warning { color: var(--red); }
.inner > .hint { margin-top: 9px; }

.consent { display: flex; gap: 10px; padding: 9px 0; align-items: flex-start; }
.consent input { margin: 5px 0 0; width: 16px; height: 16px; flex: none; }
.consent label { max-width: 72ch; font-size: 15px; }

.actions {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--grey-rule);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-block;
  padding: 11px 24px;
  font: 500 15px 'Roboto', Arial, sans-serif;
  color: #fff;
  text-decoration: none;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  cursor: pointer;
}
.button:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.button.secondary {
  background: #fff;
  color: var(--blue);
  border-color: var(--blue);
}
.button.secondary:hover { background: var(--blue-pale); color: var(--blue-dark); }

/* ---------- queue ticket ---------- */

/* The server typesets the ticket: the application page shows either the
   form or the ticket, never both. :target used to decide that; the
   session decides it now. */

.ticket {
  display: grid;
  grid-template-columns: 200px minmax(0,1fr);
  gap: 28px;
  align-items: center;
}
.number-large {
  margin: 0;
  border-radius: var(--radius);
  background: #10202e;
  color: #ffc700;
  text-align: center;
  padding: 16px 10px 20px;
}
.number-large .label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  color: #8fa8bd;
}
.number-large .value {
  display: block;
  font-size: 76px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.status dl {
  display: grid;
  grid-template-columns: minmax(0, 230px) minmax(0,1fr);
  gap: 9px 16px;
  margin: 0;
  font-size: 15px;
}
.status dt { color: var(--text-muted); }
.status dd { margin: 0; font-weight: 500; }

.progress {
  margin: 16px 0 0;
  height: 8px;
  border-radius: 4px;
  background: var(--grey-panel);
  overflow: hidden;
}
.progress span { display: block; height: 100%; width: 0; background: var(--blue); }

/* ---------- form defects ---------- */

.errors {
  margin: 0 0 18px;
  border: 1px solid var(--red);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: #fdf3f4;
  padding: 14px 18px;
  font-size: 15px;
  color: var(--red);
}
.errors p { margin: 0 0 8px; font-weight: 700; }
.errors ul { margin: 0; padding-left: 20px; }
.errors li { margin-bottom: 4px; }
.errors li:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */

.footer {
  border-top: 4px solid var(--blue);
  background: var(--grey-panel);
  padding: 24px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}
.footer p { margin: 0 0 6px; }
.footer .counter {
  font-family: 'Courier New', Courier, monospace;
  background: #11161c;
  color: #6fe36f;
  padding: 2px 7px;
  border-radius: 2px;
  font-size: 13px;
  letter-spacing: 2px;
}
.footer p:last-child { margin-bottom: 0; }

/* ================= CERTIFICATE ================= */

body.certificate { background: #59606b; }
.certificate .wrapper { background: transparent; padding: 28px 0 48px; }

.paper {
  position: relative;
  width: 760px;
  max-width: calc(100% - 24px);
  margin: 0 auto;
  background: #fffefa;
  border: 1px solid #b0aca2;
  box-shadow: 0 12px 34px rgba(0,0,0,.42);
  padding: 46px 58px 34px;
  font-family: 'Tinos', 'Times New Roman', Times, serif;
  font-size: 15px;
  line-height: 1.6;
  color: #14161a;
}

.letterhead { text-align: center; border-bottom: 1px solid #14161a; padding-bottom: 12px; }
.letterhead img { width: 68px; height: auto; }
.letterhead .office-name {
  margin: 6px 0 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.letterhead .motto {
  margin: 3px 0 0;
  font-size: 10px;
  letter-spacing: .3em;
  color: #6a635a;
  text-transform: uppercase;
}
.letterhead .address { margin: 7px 0 0; font-size: 12px; color: #4b4740; }

.file-details {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 20px;
  margin: 18px 0 26px;
  font-size: 13px;
}
.file-details dl { margin: 0; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 1px 10px; }
.file-details dt { color: #4b4740; }
.file-details dd { margin: 0; }
.file-details .reference { font-family: 'Courier New', monospace; font-size: 12px; letter-spacing: .5px; }
.file-details .place { text-align: right; align-self: end; white-space: nowrap; }

.paper h1 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.paper .statute { margin: 0 0 22px; text-align: center; font-size: 12px; color: #4b4740; }
.paper p { margin: 0 0 13px; text-align: justify; hyphens: auto; }
.paper .name {
  margin: 20px 0;
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .06em;
}
.paper .details { text-align: center; font-size: 13px; color: #4b4740; margin: -14px 0 20px; }
.paper .emphasis { font-style: italic; }

.fee {
  margin: 22px 0;
  border-top: 1px solid #c9c4ba;
  border-bottom: 1px solid #c9c4ba;
  padding: 9px 0;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.fee b { font-size: 15px; }

/* signature area: the stamp crosses the signature rule, as it does on a real listina */
.signature { position: relative; margin-top: 30px; padding-top: 112px; padding-bottom: 46px; }
.signature .signature-block {
  width: 280px;
  margin-left: auto;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}
.signature .signature-block .rule { border-top: 1px solid #14161a; padding-top: 5px; }
.signature .by-proxy { font-size: 11px; }
.stamp {
  position: absolute;
  right: 232px;
  top: 24px;
  width: 176px;
  height: 176px;
  color: var(--stamp);
  transform: rotate(-13deg);
  opacity: .82;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.signature .scrawl {
  position: absolute;
  right: 54px;
  top: 46px;
  width: 196px;
  color: #1c2a6b;
  pointer-events: none;
}

.advisory {
  margin-top: 30px;
  border-top: 1px solid #c9c4ba;
  padding-top: 10px;
  font-size: 11px;
  line-height: 1.5;
  color: #4b4740;
}
.advisory p { text-align: left; margin: 0 0 6px; }

.controls {
  width: 760px;
  max-width: calc(100% - 24px);
  margin: 20px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.controls .footnote { font-size: 14px; color: #e8eaec; }
.controls .button.secondary { background: transparent; color: #fff; border-color: #b6bcc6; }
.controls .button.secondary:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- responsive ---------- */

@media (max-width: 1140px) {
  .layout { grid-template-columns: 220px minmax(0,1fr); }
  .layout > .news { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .layout, .layout.narrow { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .layout > .news { grid-column: auto; }
  .masthead { flex-wrap: wrap; }
  .services { margin-left: 0; width: 100%; }
  .search { width: 100%; }
  .search input { width: 100%; max-width: none; }
  .nav { overflow-x: auto; flex-wrap: nowrap; }
  .nav a { white-space: nowrap; }
  h1.page { font-size: 26px; }
  .lede { font-size: 16px; }
  .ticket { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .status dl { grid-template-columns: minmax(0,1fr); gap: 2px; }
  .status dd { margin-bottom: 8px; }
  .file-details { grid-template-columns: minmax(0,1fr); }
  .file-details .place { text-align: left; }
  .paper { padding: 26px 22px 24px; font-size: 14px; }
  .paper h1 { font-size: 20px; letter-spacing: .05em; }
  .letterhead .office-name { font-size: 15px; letter-spacing: .14em; }
  /* Stacked: signature above the rule, stamp riding up over the block's empty left side. */
  .signature { padding-top: 0; display: flex; flex-direction: column; }
  .signature .scrawl { position: static; order: 1; align-self: center; width: 176px; margin: 0 0 -14px; }
  .signature .signature-block { position: static; order: 2; width: auto; margin: 0; }
  .stamp {
    position: static;
    order: 3;
    align-self: flex-start;
    width: 142px;
    height: 142px;
    margin: -52px 0 0 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media print {
  body.certificate { background: #fff; }
  .controls, .topbar, .nav, .services, .menu, .skip { display: none; }
  .layout, .layout.narrow { display: block; padding: 0; }
  .panel { break-inside: avoid; }
  .paper { box-shadow: none; border: 0; width: auto; max-width: none; padding: 0; }
}
