:root {
  color-scheme: dark;
  --ink: #0b0a09;
  --panel: #14110e;
  --outline: #322922;
  --accent: #ffa000;
  --gold: #ffc168;
  --text: #f7f1e7;
  --muted: #b8ada0;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.5rem; }
body.stretched, #wrapper { margin: 0; background: var(--ink); color: var(--text); }
body { font: 400 1rem/1.6 'Space Grotesk', system-ui, sans-serif; }
h1, h2, h3, h4 { margin: 0 0 .7em; line-height: 1.08; }
p { margin: 0 0 1.2em; }
ul, ol { padding-inline-start: 1.25rem; }
a { color: var(--gold); text-underline-offset: .22em; }
a:hover { color: #ffdaa3; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.container { width: min(100% - 2.5rem, 1232px); margin-inline: auto; }
.skip-link { position: absolute; top: .6rem; left: .6rem; z-index: 10; transform: translateY(-150%); background: var(--ink); padding: .6rem 1rem; }
.skip-link:focus { transform: none; }
.header-row { display: grid; align-items: center; grid-template-columns: 1fr auto; gap: .75rem 1rem; padding-block: .85rem; }
#logo { width: fit-content; }
.primary-menu { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem 1.35rem; grid-column: 1 / -1; }
#header .cnvs-menu-link { display: inline-flex; align-items: center; min-height: 42px; text-decoration: none; }
#header .cnvs-menu-link[aria-current] { color: var(--gold); }
.header-cta { display: none; }
.menu-toggle, .text-button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; }
.menu-toggle { min-height: 44px; padding: 0 .65rem; border: 1px solid var(--outline); border-radius: 5px; }
.text-button:hover { color: var(--text); }
.co-btn-primary, .co-nav-cta, .co-btn-primary:hover { color: #1b1104; }
.co-btn-primary:hover, .co-nav-cta:hover { background: #ffb43a; opacity: 1; }
.co-btn-ghost { border: 1px solid #695341; color: var(--text); }
.co-btn-ghost:hover { border-color: var(--gold); }
.co-btn-primary, .co-btn-ghost { justify-content: center; min-height: 46px; }
#co-hero {
  min-height: 0;
  padding: clamp(2.5rem, 7vw, 6.75rem) 0 0;
  display: block;
  background: radial-gradient(ellipse at 75% 56%, #24170b, transparent 62%), var(--ink);
}
.co-hero-glow { left: 76%; width: min(65vw, 720px); background: #ffa00013; filter: blur(85px); }
.co-hero-noise { opacity: .75; }
.hero-layout { position: relative; display: grid; align-items: center; gap: 1rem; }
.hero-copy { min-width: 0; z-index: 1; }
.co-hero h1 { font-size: clamp(2.85rem, 8vw, 5.55rem); text-wrap: balance; margin-bottom: .34em; font-weight: 400; }
.co-hero h1 em { color: var(--gold); white-space: normal; }
.hero-text { max-width: 560px; }
.rich-text.hero-text { font-size: clamp(.98rem, 2.1vw, 1.09rem); }
.hero-text p:has(.co-btn-primary, .co-btn-ghost) { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.hero-text p:last-child { margin-bottom: 0; }
.coin-stage { position: relative; isolation: isolate; display: grid; place-items: center; width: min(100%, 530px); aspect-ratio: 1.1; margin-inline: auto; }
.coin-stage::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse, #fdb04a24, transparent 65%); pointer-events: none; }
.coin-guides { position: absolute; inset: 0; background-image: linear-gradient(#ffca7a0c 1px, transparent 1px), linear-gradient(90deg, #ffca7a0c 1px, transparent 1px); background-size: 37px 37px; mask-image: radial-gradient(ellipse, #000 29%, transparent 72%); }
.coin-guides span { width: 84%; aspect-ratio: 1; position: absolute; top: 50%; left: 50%; border: 1px solid #ffc16833; border-radius: 50%; transform: translate(-50%, -50%); }
.coin-guides span:nth-child(2) { width: 73%; border-style: dashed; }
.coin-guides span:nth-child(3) { width: 94%; border-color: #ffc16819; }
.coin-fallback { position: relative; width: 62%; max-width: 344px; filter: drop-shadow(0 18px 34px #000b); }
#co-hero-gl { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.hero-end { position: relative; border-top: 1px solid #ffc16824; margin-top: clamp(.6rem, 4vw, 2.7rem); }
.hero-end a { display: inline-flex; gap: .75rem; align-items: center; min-height: 52px; color: var(--muted); text-decoration: none; font-size: .9rem; }
.hero-end span { color: var(--gold); }
.co-section { padding: clamp(3rem, 7vw, 6.25rem) 0; background: var(--ink); }
.co-section-heading, .about-copy h2 { font-size: clamp(2.75rem, 6vw, 4.55rem); margin: 0 0 .55em; font-weight: 400; }
.co-feature-grid { grid-template-columns: 1fr; margin-top: 0; background: var(--outline); border-color: var(--outline); }
.co-feature-card, .co-feature-card:hover { padding: clamp(1.25rem, 4vw, 2.8rem); background: var(--panel); }
.co-feature-card:hover { background: #1b1510; }
.rich-text { color: var(--muted); overflow-wrap: anywhere; }
.rich-text :is(h2,h3,h4) { color: var(--text); }
.rich-text h3, .trust-card h2, .form-panel h2, .admin-panel h2 { font-size: clamp(1.85rem, 4vw, 2.6rem); }
.rich-text :is(p,ul,ol,address):last-child { margin-bottom: 0; }
.rich-text address { font-style: normal; }
.rich-text a[class*='co-btn'] { text-decoration: none; }
.portal-logo { width: auto; max-width: min(190px, 100%); height: 67px; object-fit: contain; object-position: left; }
.portal-logo[src$="/vzacne-mince.svg"] { padding: .45rem .65rem; background: #f7ecd8; border-radius: 4px; }
.portal-logo[src$="/historici.svg"] { height: 67px; }
.portal-link { display: inline-block; padding-block: .4rem; font-weight: 600; }
.about-section { border-top: 1px solid var(--outline); background: #100e0c; }
.about-grid, .contact-grid { display: grid; gap: 2.5rem; }
.about-copy { max-width: 65ch; }
.trust-card, .form-panel { padding: clamp(1.15rem, 3vw, 2.2rem); background: var(--panel); border: 1px solid var(--outline); }
.trust-list { line-height: 1.9; }
.saec-logo { width: 110px; padding: .35rem .45rem; background: #fff; border-radius: 4px; }
.inner-page { min-height: 57vh; background: radial-gradient(ellipse at 80% 0%, #1c140b, transparent 50%), var(--ink); }
.article-body { max-width: 75ch; }
.article-body h2, .contact-details h2 { font-size: 2rem; margin-top: 1.35em; }
.article-body h2:first-child, .contact-details h2:first-child { margin-top: 0; }
.contact-jump { display: inline-flex; align-items: center; min-height: 44px; margin: -.25rem 0 .85rem; }
.form-stack { display: grid; gap: .95rem; }
.form-stack label { display: block; font-size: .94rem; }
.form-stack input:not([type=checkbox]), .form-stack textarea {
  display: block; width: 100%; border: 1px solid #56473b; border-radius: 4px; margin-top: .3rem;
  color: var(--text); background: #0e0c0a; padding: .64rem .8rem; min-height: 44px;
}
.form-stack textarea { resize: vertical; }
.form-stack button { justify-self: start; }
.form-pair { display: grid; gap: .95rem; }
.form-stack .checkbox-row { display: flex; gap: .65rem; align-items: flex-start; }
.checkbox-row input { margin: .28em 0 0; width: 1.06rem; height: 1.06rem; flex: 0 0 auto; accent-color: var(--accent); }
.field-note { font-size: .88rem; margin: -.55rem 0 .2rem 1.7rem; }
.muted { color: var(--muted); }
.captcha input { max-width: 7rem; }
.notice { border: 1px solid #aa7d46; background: #2b2115; padding: .65rem .85rem; }
.notice.error { border-color: #b36555; background: #321a16; color: #ffd7ce; }
.form-narrow { max-width: 29rem; }
.admin-layout { display: grid; gap: 1.75rem; }
.admin-nav { display: flex; flex-wrap: wrap; gap: .2rem 1rem; align-content: start; }
.admin-nav a, .admin-nav button { display: block; padding: .5rem 0; }
.admin-nav [aria-current] { color: var(--text); font-weight: 600; }
.admin-panel { min-width: 0; }
.admin-panel h2:not(:first-child) { margin-top: 2rem; }
.delete-page { margin-top: 1.5rem; color: #ffb9a9; }
.delete-page summary { cursor: pointer; }
.danger-button { padding: .45rem 1rem; border: 1px solid #b36555; background: #321a16; color: #ffd7ce; cursor: pointer; }
#footer { border-top: 1px solid var(--outline); background: #0b0a09; }
.footer-main, .footer-bottom { display: flex; flex-wrap: wrap; gap: .7rem 1.35rem; align-items: center; padding-block: 1.25rem; }
.footer-main a:not(:first-child), .footer-main button, .footer-bottom { font-size: .83rem; }
.footer-main a, .footer-bottom a { text-decoration: none; color: var(--muted); }
.footer-main a:hover, .footer-bottom a:hover { color: var(--text); }
.footer-bottom { justify-content: space-between; border-top: 1px solid var(--outline); color: var(--muted); padding-block: .8rem; }
.footer-bottom a { font-size: .76rem; }
.cookie-banner {
  position: fixed; z-index: 5; inset: auto 0 0; display: grid; align-items: center; gap: .7rem 1.4rem;
  padding: .9rem max(1rem, calc((100vw - 1232px) / 2)); padding-bottom: max(.9rem, env(safe-area-inset-bottom));
  border-top: 1px solid #8c5c2c; background: #18130ef9; box-shadow: 0 -12px 30px #0007;
}
.cookie-banner h2 { font: 600 1rem 'Space Grotesk', sans-serif; margin: 0 0 .25rem; }
.cookie-banner p { color: var(--muted); font-size: .88rem; margin: 0; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cookie-actions button { border: 1px solid #9a6a36; background: #261b11; color: #ffdfae; font-size: .88rem; padding-inline: .95rem; }
.cookie-actions button:hover { color: #fff4df; background: #412a17; }

@media (max-width: 759px) {
  .primary-menu[data-collapsed='true'] { display: none; }
}
@media (min-width: 560px) {
  .form-pair, .co-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
  .container { width: min(100% - 4.5rem, 1232px); }
  .header-row { grid-template-columns: auto 1fr auto; min-height: 76px; }
  .primary-menu { grid-column: auto; justify-content: center; }
  .header-cta { display: inline-flex; align-self: center; }
  .menu-toggle { display: none; }
  .hero-layout { grid-template-columns: 1.12fr 1fr; }
  .co-hero h1 { font-size: clamp(3.4rem, 6.5vw, 5.55rem); text-wrap: initial; }
  .about-grid, .contact-grid { grid-template-columns: 1.1fr .9fr; align-items: start; }
  .contact-grid { grid-template-columns: .82fr 1.18fr; }
  .contact-jump { display: none; }
  .admin-layout { grid-template-columns: 14rem minmax(0, 1fr); }
  .admin-nav { display: block; }
  .cookie-banner { grid-template-columns: 1fr auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

.coin-photo-hidden { visibility: hidden; }

.header-cta::after,
.hero-text .co-btn-primary::after,
.hero-text .co-btn-ghost::after,
.co-feature-card .portal-link::after {
  content: '';
  display: inline-block;
  width: .85em;
  height: .85em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 12 12 4M5 4h7v7' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain;
}
.co-feature-card .portal-link::after { margin-inline-start: .45em; vertical-align: -.06em; }
