/* Audit radiační ochrany · ÚRO brand: systémová zeleň, radiačná žltá, aktívna limetka; DM Sans + IBM Plex Mono */
@font-face { font-family: 'DM Sans'; src: url('fonts/dmsans-latin-400-normal.woff2') format('woff2'); font-weight: 400; unicode-range: U+0000-00FF, U+2000-206F, U+2212; font-display: block; }
@font-face { font-family: 'DM Sans'; src: url('fonts/dmsans-latin-ext-400-normal.woff2') format('woff2'); font-weight: 400; unicode-range: U+0100-024F, U+1E00-1EFF; font-display: block; }
@font-face { font-family: 'DM Sans'; src: url('fonts/dmsans-latin-500-normal.woff2') format('woff2'); font-weight: 500; unicode-range: U+0000-00FF, U+2000-206F, U+2212; font-display: block; }
@font-face { font-family: 'DM Sans'; src: url('fonts/dmsans-latin-ext-500-normal.woff2') format('woff2'); font-weight: 500; unicode-range: U+0100-024F, U+1E00-1EFF; font-display: block; }
@font-face { font-family: 'DM Sans'; src: url('fonts/dmsans-latin-600-normal.woff2') format('woff2'); font-weight: 600; unicode-range: U+0000-00FF, U+2000-206F, U+2212; font-display: block; }
@font-face { font-family: 'DM Sans'; src: url('fonts/dmsans-latin-ext-600-normal.woff2') format('woff2'); font-weight: 600; unicode-range: U+0100-024F, U+1E00-1EFF; font-display: block; }
@font-face { font-family: 'DM Sans'; src: url('fonts/dmsans-latin-700-normal.woff2') format('woff2'); font-weight: 700; unicode-range: U+0000-00FF, U+2000-206F, U+2212; font-display: block; }
@font-face { font-family: 'DM Sans'; src: url('fonts/dmsans-latin-ext-700-normal.woff2') format('woff2'); font-weight: 700; unicode-range: U+0100-024F, U+1E00-1EFF; font-display: block; }
@font-face { font-family: 'Plex Mono'; src: url('fonts/plexmono-latin-400-normal.woff2') format('woff2'); font-weight: 400; unicode-range: U+0000-00FF, U+2000-206F; font-display: block; }
@font-face { font-family: 'Plex Mono'; src: url('fonts/plexmono-latin-ext-400-normal.woff2') format('woff2'); font-weight: 400; unicode-range: U+0100-024F, U+1E00-1EFF; font-display: block; }
@font-face { font-family: 'Plex Mono'; src: url('fonts/plexmono-latin-500-normal.woff2') format('woff2'); font-weight: 500; unicode-range: U+0000-00FF, U+2000-206F; font-display: block; }
@font-face { font-family: 'Plex Mono'; src: url('fonts/plexmono-latin-ext-500-normal.woff2') format('woff2'); font-weight: 500; unicode-range: U+0100-024F, U+1E00-1EFF; font-display: block; }

:root {
  --sys: #052C1F; --sys2: #0A3A29; --inst: #006633; --petrol: #085E54; --lime: #AED532; --yel: #F7FC32;
  --ink: #fff; --ink2: rgba(255,255,255,.72); --ink3: rgba(255,255,255,.46); --line: rgba(174,213,50,.22); --tile: rgba(255,255,255,.055);
  --ok: #AED532; --warn: #F2B33D; --bad: #FF6B5E;
  --ease: cubic-bezier(.22,1,.36,1);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--sys); color: var(--ink); font-family: 'DM Sans', system-ui, sans-serif; overflow: hidden;
  -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; touch-action: manipulation; overscroll-behavior: none; }
input { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
#app { position: fixed; inset: 0; display: flex; flex-direction: column; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
canvas.dots { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease); }
canvas.dots.on { opacity: 1; }

/* ---------- top bar ---------- */
.bar { position: relative; z-index: 5; height: 92px; flex: 0 0 auto; display: flex; align-items: center; gap: 28px; padding: 0 56px; }
.bar .logo { height: 34px; width: auto; }
.bar .prog { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; opacity: 0; transition: opacity .5s; }
.bar .prog i { display: block; height: 100%; width: 0; background: var(--lime); border-radius: 2px; transition: width .6s var(--ease); }
.bar .cnt { font-family: 'Plex Mono'; font-size: 15px; color: var(--ink3); min-width: 54px; text-align: right; opacity: 0; transition: opacity .5s; }
.bar .back { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--tile); opacity: 0; pointer-events: none; transition: opacity .4s, background .2s; }
.bar .back:active { background: rgba(255,255,255,.14); }
.bar .back svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#app.inflow .bar .prog, #app.inflow .bar .cnt { opacity: 1; }
#app.inflow .bar .back { opacity: 1; pointer-events: auto; }

/* ---------- screens ---------- */
#stage { position: relative; flex: 1; min-height: 0; }
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 24px 56px 48px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.scr.center { justify-content: center; }
.wrap { width: 100%; max-width: 900px; margin: 0 auto; }
.in { opacity: 0; transform: translateY(18px); filter: blur(8px); transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease); }
.scr.show .in { opacity: 1; transform: none; filter: none; }
.scr.leave { transition: opacity .35s ease, transform .35s ease, filter .35s ease; opacity: 0; transform: translateX(-40px); filter: blur(6px); }
.scr.leave.rev { transform: translateX(40px); }

h1, h2 { margin: 0; font-weight: 700; letter-spacing: -.035em; }
h1 { font-size: clamp(56px, 8.2vw, 104px); line-height: .98; }
h2 { font-size: clamp(36px, 4.6vw, 54px); line-height: 1.06; }
h1 em, h2 em { font-style: normal; color: var(--yel); }
.lead { margin-top: 26px; font-size: clamp(22px, 2.4vw, 28px); color: var(--ink2); font-weight: 500; line-height: 1.35; }
.tag { font-family: 'Plex Mono'; font-size: 15px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); margin-bottom: 20px; }
.small { font-family: 'Plex Mono'; font-size: 14px; color: var(--ink3); }

.pill { display: inline-flex; align-items: center; justify-content: center; gap: 14px; height: 76px; padding: 0 40px; border-radius: 38px; background: var(--yel); color: var(--sys);
  font-size: 25px; font-weight: 600; letter-spacing: -.01em; transition: transform .15s, opacity .2s; }
.pill:active { transform: scale(.97); }
.pill svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pill.ghost { background: var(--tile); color: #fff; border: 1.5px solid var(--line); }
.pill[disabled] { opacity: .35; pointer-events: none; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- start ---------- */
.start .pill { margin-top: 56px; }
.start .foot { position: absolute; left: 56px; right: 56px; bottom: 40px; display: flex; justify-content: space-between; }

/* ---------- search ---------- */
.search { position: relative; margin-top: 34px; }
.search input { width: 100%; height: 84px; border-radius: 22px; border: 1.5px solid var(--line); background: var(--tile); color: #fff; font: 500 30px 'DM Sans'; padding: 0 28px 0 76px; outline: none;
  transition: border-color .2s, background .2s; -webkit-appearance: none; }
.search input::placeholder { color: var(--ink3); }
.search input:focus { border-color: var(--lime); background: rgba(255,255,255,.08); }
.search > svg { position: absolute; left: 26px; top: 27px; width: 30px; height: 30px; fill: none; stroke: var(--ink3); stroke-width: 2; stroke-linecap: round; }
.res { margin-top: 14px; display: grid; gap: 8px; }
.res button { display: flex; align-items: center; gap: 18px; width: 100%; text-align: left; padding: 18px 24px; border-radius: 18px; background: var(--tile); border: 1.5px solid transparent;
  animation: rin .45s var(--ease) both; transition: background .15s, border-color .15s; }
.res button:active, .res button.sel { background: rgba(174,213,50,.14); border-color: var(--lime); }
.res b { display: block; font-size: 22px; font-weight: 600; line-height: 1.2; }
.res b mark { background: none; color: var(--yel); }
.res span { display: block; margin-top: 4px; font-size: 16px; color: var(--ink2); }
.res .ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(174,213,50,.12); }
.res .ic svg { width: 22px; height: 22px; fill: none; stroke: var(--lime); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.res .none { padding: 18px 24px; color: var(--ink2); font-size: 18px; }
@keyframes rin { from { opacity: 0; transform: translateY(10px); } }

/* ---------- institution + modalities ---------- */
.inst { display: flex; gap: 22px; align-items: center; padding: 26px 28px; border-radius: 24px; background: var(--tile); border: 1.5px solid var(--line); margin-top: 30px; }
.inst .ic { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 18px; background: var(--lime); display: grid; place-items: center; }
.inst .ic svg { width: 30px; height: 30px; fill: none; stroke: var(--sys); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.inst b { display: block; font-size: 26px; font-weight: 600; line-height: 1.2; }
.inst span { display: block; margin-top: 6px; font-size: 17px; color: var(--ink2); }
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 34px; }
.chip { display: flex; align-items: center; gap: 16px; height: 78px; padding: 0 22px; border-radius: 20px; background: var(--tile); border: 1.5px solid var(--line); font-size: 21px; font-weight: 500; text-align: left;
  transition: background .2s, border-color .2s, color .2s, transform .15s; }
.chip:active { transform: scale(.98); }
.chip i { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.chip i svg { width: 16px; height: 16px; fill: none; stroke: var(--sys); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .3s var(--ease); }
.chip.on { background: rgba(174,213,50,.13); border-color: var(--lime); }
.chip.on i { background: var(--lime); border-color: var(--lime); }
.chip.on i svg { opacity: 1; transform: none; }
.sub { margin-top: 40px; font-size: 24px; font-weight: 600; }

/* ---------- question ---------- */
.q h2 { max-width: 880px; }
.opts { display: grid; gap: 10px; margin-top: 30px; max-width: 880px; }
.opt { display: flex; align-items: center; gap: 20px; min-height: 78px; padding: 18px 26px; border-radius: 22px; background: var(--tile); border: 1.5px solid var(--line); font-size: 23px; font-weight: 500; text-align: left; line-height: 1.25;
  opacity: 0; transition: background .18s, border-color .18s, color .18s, transform .18s; }
.scr.show .opt { animation: rup .55s var(--ease) forwards; }
@keyframes rup { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.opt:active { transform: scale(.985); }
.opt .k { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 500 16px 'Plex Mono'; color: var(--ink3); border: 1.5px solid rgba(255,255,255,.18); transition: all .18s; }
.opt.sel { background: var(--yel); border-color: var(--yel); color: var(--sys); }
.opt.sel .k { border-color: rgba(5,44,31,.3); color: var(--sys); }

/* skip: quiet, below the answers */
.skip { margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 24px; border-radius: 28px; font-size: 19px; font-weight: 500; color: var(--ink2);
  border: 1.5px solid rgba(255,255,255,.14); transition: background .15s, color .15s; opacity: 0; }
.scr.show .skip { animation: rup .55s .5s var(--ease) forwards; }
.skip:active { background: var(--tile); color: #fff; }
.skip svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- result ---------- */
.result { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: start; max-width: 1180px; margin: 0 auto; width: 100%; }
.ring { position: relative; width: 300px; height: 300px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 18; }
.ring .tr { stroke: rgba(255,255,255,.08); }
.ring .fg { stroke: var(--yel); stroke-linecap: round; transition: stroke 0.6s; }
.ring .num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .num b { font-size: 112px; font-weight: 700; letter-spacing: -.05em; line-height: .9; }
.ring .num span { font-family: 'Plex Mono'; font-size: 17px; color: var(--ink3); margin-top: 10px; }
.verdict { margin-top: 26px; font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.verdict small { display: block; margin-top: 10px; font-size: 18px; font-weight: 500; color: var(--ink2); letter-spacing: 0; line-height: 1.35; }
.btns { display: grid; gap: 12px; margin-top: 30px; }
.btns .pill { height: 66px; font-size: 21px; padding: 0 26px; }
.areas { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 34px; padding-top: 8px; }
.area { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: end; font-size: 17px; font-weight: 500; line-height: 1.25; }
.area .b { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.area .b i { display: block; height: 100%; width: 0; border-radius: 4px; transition: width 1.2s var(--ease); }
.area em { font: 500 16px 'Plex Mono'; font-style: normal; text-align: right; color: var(--ink2); }
.gaps { margin-top: 44px; }
.gaps h3 { margin: 0 0 8px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.gap { position: relative; padding: 16px 0 16px 26px; border-top: 1px solid rgba(255,255,255,.08); }
.gap::before { content: ""; position: absolute; left: 2px; top: 24px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.gap.part::before { background: var(--warn); }
.gap b { display: block; font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.lawl { margin-top: 6px; font-size: 15px; color: var(--ink3); line-height: 1.5; }
.lawl em { font-style: normal; color: var(--ink2); }
.lawl i { font-style: normal; margin: 0 8px; opacity: .6; }

.dms { margin-top: 22px; display: flex; gap: 12px; align-items: baseline; font-size: 16px; line-height: 1.45; color: var(--ink2); }
.dms::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); transform: translateY(-1px); }

/* ---------- e-mail before the result ---------- */
.gate input[type=email] { margin-top: 34px; width: 100%; max-width: 760px; height: 84px; border-radius: 22px; border: 1.5px solid var(--line); background: var(--tile); color: #fff; font: 500 30px 'DM Sans'; padding: 0 28px; outline: none; -webkit-appearance: none; display: block; }
.gate input[type=email]:focus { border-color: var(--lime); background: rgba(255,255,255,.08); }
.gate .consent { max-width: 760px; margin-top: 24px; font-size: 18px; }
.gate .gdpr { max-width: 760px; margin: 10px 0 0 48px; font-size: 14.5px; line-height: 1.45; color: var(--ink3); }
.gate .row { margin-top: 34px; }
.sent { display: flex; gap: 12px; align-items: flex-start; margin-top: 26px; font-size: 16px; line-height: 1.45; color: var(--ink2); }
.sent svg { flex: 0 0 auto; width: 22px; height: 22px; fill: none; stroke: var(--lime); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.sent b { color: #fff; font-weight: 600; word-break: break-all; }

/* ---------- e-mail sheet (unused) ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(2,20,14,.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transition: opacity .35s; }
.sheet.on { opacity: 1; }
.sheet .card { width: min(720px, 92vw); padding: 44px; border-radius: 32px; background: var(--sys2); border: 1.5px solid var(--line); transform: translateY(30px) scale(.98); transition: transform .5s var(--ease); }
.sheet.on .card { transform: none; }
.sheet h2 { font-size: 40px; }
.sheet input[type=email] { margin-top: 26px; width: 100%; height: 78px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--tile); color: #fff; font: 500 26px 'DM Sans'; padding: 0 24px; outline: none; -webkit-appearance: none; }
.sheet input[type=email]:focus { border-color: var(--lime); }
.consent { display: flex; gap: 16px; align-items: flex-start; margin-top: 20px; font-size: 17px; color: var(--ink2); line-height: 1.4; text-align: left; }
.consent i { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; border: 2px solid rgba(255,255,255,.3); display: grid; place-items: center; margin-top: 1px; transition: all .2s; }
.consent i svg { width: 18px; height: 18px; fill: none; stroke: var(--sys); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.consent.on i { background: var(--lime); border-color: var(--lime); }
.consent.on i svg { opacity: 1; }
.sheet .gdpr { margin: 10px 0 0 48px; font-size: 14px; line-height: 1.45; color: var(--ink3); text-align: left; }
.sheet .row { margin-top: 30px; }
.sheet .done { text-align: center; }
.sheet .done .ok { width: 110px; height: 110px; margin: 0 auto 26px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; animation: pop .6s var(--ease) both; }
.sheet .done .ok svg { width: 54px; height: 54px; fill: none; stroke: var(--sys); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .25s ease forwards; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- idle ---------- */
#idle[hidden] { display: none; }
#idle { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(2,20,14,.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
#idle .card { display: grid; justify-items: center; gap: 18px; padding: 48px 64px; border-radius: 32px; background: var(--sys2); border: 1.5px solid var(--line); }
#idle b { font-size: 36px; }
#idle .num { font: 500 64px 'Plex Mono'; color: var(--yel); }

/* ---------- portrait / smaller iPads ---------- */
@media (max-width: 1100px) {
  .result { grid-template-columns: 1fr; gap: 34px; }
  .result .left { display: flex; gap: 40px; align-items: center; }
  .ring { width: 260px; height: 260px; flex: 0 0 auto; }
  .ring .num b { font-size: 96px; }
}
@media (max-width: 760px) {
  .bar { padding: 0 24px; gap: 16px; } .scr { padding: 16px 24px 32px; }
  .result .left { flex-direction: column; align-items: flex-start; }
}
