/* UI sada 15, W3-A: the new top bar (README § A of the Claude design
   hand-off handoff/design/2026-09-24-ui-sada-15/output/). Loaded from
   _header_v2.html, which only renders when ui15 is on. Everything is scoped
   to [data-ui15] and the .n2-* namespace. Colours come from tokens.css
   (existing tokens win over the prototype's hex, README § 2); --shadow-pop
   and --ease-ui15 come from ui15-base.css. */

:root[data-ui15] { --n2-ease: var(--ease-ui15, cubic-bezier(.2, .8, .2, 1)); }
:root[data-ui15].n2-lock { overflow: hidden; }

/* The frosted background sits on ::before, not on .n2 itself: a
   backdrop-filter on the header would make it the containing block of the
   position:fixed drawer inside it and clip the drawer to the 64 px bar. */
.n2 { position: sticky; top: 0; z-index: 60; border-bottom: 1px solid var(--line); font-family: var(--sans, Inter, system-ui, sans-serif); font-feature-settings: "cv05", "ss01"; font-size: 15px; line-height: 1.45; color: var(--ink); }
.n2::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px); }
.n2 *, .n2 *::before, .n2 *::after { box-sizing: border-box; }
:where(.n2) button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
:where(.n2) a { text-decoration: none; }
.n2 :focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 6px; }
:where(.n2) .ui15-ico { flex: none; } /* size = the macro's width/height */

.n2-in { max-width: 1560px; margin: 0 auto; padding: 0 40px; height: 64px; display: flex; align-items: center; gap: 28px; }

.n2-logo { display: flex; align-items: center; gap: 3px; flex: none; font-weight: 700; font-size: 19px; letter-spacing: -.02em; color: var(--ink); }
.n2-logo:hover { color: var(--ink); }
.n2-logo b { background: var(--navy); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 5px; border-radius: 5px; line-height: 1; letter-spacing: 0; }

/* nav items */
.n2-nav { position: relative; display: flex; align-items: center; gap: 2px; flex: none; }
.n2-item { position: relative; height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 8px; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: background .15s, color .15s; }
.n2-item:hover, .n2-item[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }
.n2-item.is-on { color: var(--navy); }
.n2-item.is-on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px; background: var(--navy); border-radius: 2px; }
.n2-item .n2-chev { width: 16px; height: 16px; color: var(--ink-4); transition: transform .2s var(--n2-ease); }
.n2-item[aria-expanded="true"] .n2-chev { transform: rotate(180deg); }

.n2-sp { flex: 1; min-width: 12px; }
.n2-sp-8 { flex: 0 1 8px; min-width: 12px; } /* as rendered by the prototype (.bar-sp min-width wins) */

/* morphing dropdown */
.n2-morph { position: absolute; top: calc(100% + 10px); left: 0; z-index: 70; pointer-events: none; opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top left; transition: opacity .18s var(--n2-ease), transform .22s var(--n2-ease), left .28s var(--n2-ease); }
.n2-morph.is-open { opacity: 1; transform: none; pointer-events: auto; }
.n2-morph-bg { position: absolute; inset: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); transition: width .28s var(--n2-ease), height .28s var(--n2-ease); }
.n2-morph-box { position: relative; overflow: hidden; border-radius: 14px; transition: width .28s var(--n2-ease), height .28s var(--n2-ease); }
.n2-morph.is-first, .n2-morph.is-first .n2-morph-bg, .n2-morph.is-first .n2-morph-box { transition-property: opacity, transform; }
.n2-morph.is-first .n2-morph-arrow { transition: none; }
.n2-morph-arrow { position: absolute; top: -6px; z-index: 1; width: 12px; height: 12px; background: #fff; border-left: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 2px 0 0 0; transform: rotate(45deg); transition: left .28s var(--n2-ease); }
.n2-slide { position: absolute; top: 0; left: 0; opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .2s var(--n2-ease), transform .28s var(--n2-ease), visibility 0s linear .28s; }
.n2-slide.is-on { opacity: 1; pointer-events: auto; visibility: visible; transform: none; transition-delay: 0s; }
.n2-slide.is-l { transform: translateX(-24px); }
.n2-slide.is-r { transform: translateX(24px); }

.n2-tiles { display: grid; grid-template-columns: repeat(2, 300px); gap: 4px; padding: 10px; }
.n2-tile { display: flex; gap: 14px; padding: 12px; border-radius: 10px; text-align: left; color: var(--ink); transition: background .15s; }
a.n2-tile:hover { background: var(--surface); color: var(--ink); }
.n2-tile-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--navy-soft); color: var(--navy); display: grid; place-items: center; flex: none; }
.n2-tile-ic .ui15-ico { width: 20px; height: 20px; }
.n2-tile-t { display: block; min-width: 0; }
.n2-tile b { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.n2-tile-d { display: block; margin-top: 2px; color: var(--ink-3); font-size: 14px; text-wrap: pretty; }
.n2-tile.is-soon { cursor: default; }
.n2-tile.is-soon .n2-tile-ic { background: var(--surface-2); color: var(--ink-3); }
.n2-tag { white-space: nowrap; font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); letter-spacing: .01em; }
.n2-tiles-f { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 10px 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); font-size: 14px; color: var(--ink-3); }
.n2-tiles-f a { font-weight: 600; color: var(--navy); white-space: nowrap; }
.n2-guide { width: 300px; padding: 8px; }
.n2-guide a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; white-space: nowrap; }
.n2-guide a:hover { background: var(--surface); color: var(--ink); }
.n2-guide a .ui15-ico { color: var(--ink-4); }

/* search */
.n2-search { position: relative; flex: 1 1 560px; min-width: 420px; max-width: 560px; }
.n2-in.is-anon .n2-search { min-width: 200px; } /* three more controls on the right */
.n2-search.is-full { flex: none; width: 100%; min-width: 0; max-width: none; }
.n2-search-f { height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; background: var(--surface-2); border: 1px solid transparent; border-radius: 10px; cursor: text; transition: background .15s, border-color .15s, box-shadow .15s; }
.n2-search-f:hover { background: #e6eaee; }
.n2-search-f:focus-within { background: #fff; border-color: var(--navy); box-shadow: 0 0 0 4px var(--navy-soft); }
.n2-search-f > .ui15-ico { color: var(--ink-4); }
.n2-search-f input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: 0; font: inherit; font-size: 15px; color: var(--ink); padding: 0; -webkit-appearance: none; appearance: none; }
.n2-search-f input::placeholder { color: var(--ink-4); opacity: 1; }
.n2-search-f input::-webkit-search-cancel-button, .n2-search-f input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.n2 .n2-search-f input:focus-visible { outline: 0; }
.n2-kbd { font: inherit; font-size: 12px; font-weight: 500; color: var(--ink-4); border: 1px solid var(--line-2); background: #fff; border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.n2-search-f:focus-within .n2-kbd, .n2-search-f input:not(:placeholder-shown) ~ .n2-kbd { display: none; }
.n2 .n2-search-x { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--ink-3); flex: none; }
.n2 .n2-search-x:hover { background: var(--surface-2); }
.n2-search-f input:placeholder-shown ~ .n2-search-x { display: none; }

.n2-sugg, .n2-search .nv-search__empty { position: absolute; top: calc(100% + 8px); left: 0; width: 100%; min-width: 340px; max-width: 620px; z-index: 75; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 8px; animation: n2-pop .16s var(--n2-ease); }
.n2-search.is-full .n2-sugg, .n2-search.is-full .nv-search__empty { position: static; min-width: 0; max-width: none; margin-top: 8px; box-shadow: none; }
.n2-sugg[hidden], .n2-search .nv-search__empty[hidden] { display: none; }
.n2-sugg ul { list-style: none; margin: 0; padding: 0; max-height: min(70vh, 520px); overflow-y: auto; }
/* group label ("Značky" / "Modely") painted above the first row of each
   group; the listbox itself holds only option rows (see hladanie.js). */
.n2-sugg-i.has-group { position: relative; margin-top: 29px; }
.n2-sugg-i.has-group::before { content: attr(data-group); position: absolute; left: 10px; top: -21px; font-size: 12px; font-weight: 600; line-height: 17px; color: var(--ink-4); letter-spacing: .01em; pointer-events: none; }
.n2-sugg-i { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 8px; text-align: left; cursor: pointer; color: var(--ink); }
.n2-sugg-i:hover, .n2-sugg-i.is-active { background: var(--surface); }
.n2-sugg-i b { font-weight: 600; }
.n2-sugg-i .n2-sugg-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n2-sugg-i .n2-sugg-y { color: var(--ink-4); }
.n2-sugg-i small { margin-left: auto; padding-left: 8px; color: var(--ink-4); font-size: 13px; white-space: nowrap; }
.n2-sugg-av { width: 30px; height: 30px; border-radius: 8px; background: var(--navy-soft); color: var(--navy); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.n2-sugg-th { width: 48px; height: 30px; border-radius: 6px; background: var(--surface) center / contain no-repeat; color: var(--ink-5); display: grid; place-items: center; flex: none; }
.n2-sugg-th .ui15-ico { width: 20px; height: 20px; }
.n2-search .nv-search__empty { color: var(--ink-3); padding: 14px 18px; font-size: 15px; }
.n2-search .nv-search__empty a { color: var(--navy); font-weight: 600; margin-left: 4px; }

/* account */
.n2-acct-wrap, .n2-lang-wrap { position: relative; flex: none; }
.n2-acct { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 8px 0 4px; border-radius: 999px; flex: none; transition: background .15s; }
.n2-acct:hover, .n2-acct[aria-expanded="true"] { background: var(--surface-2); }
.n2-acct .n2-chev { width: 16px; height: 16px; color: var(--ink-4); }
.n2-av { width: 32px; height: 32px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; }
.n2-acct-n { font-weight: 500; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.n2-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 75; min-width: 280px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); animation: n2-pop .16s var(--n2-ease); }
.n2-acct-pop { width: 300px; }
.n2-lang-pop { min-width: 170px; }
@keyframes n2-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.n2-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.n2-pop form { margin: 0; }

.n2-prem { display: flex; align-items: center; gap: 10px; margin: 2px 2px 6px; padding: 10px 12px; border-radius: 10px; background: var(--navy-soft); color: var(--navy); font-size: 14px; }
.n2-prem b { font-weight: 600; }
.n2-prem span { color: var(--ink-3); }
.n2-prem a { margin-left: auto; font-weight: 600; font-size: 13px; color: var(--navy); white-space: nowrap; }
.n2-prem.is-free { background: var(--surface); color: var(--ink-3); }
.n2-prem.is-free b { color: var(--ink); }

.n2-mi { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 8px; text-align: left; font-weight: 500; font-size: 15px; color: var(--ink); white-space: nowrap; }
a.n2-mi:hover, button.n2-mi:hover { background: var(--surface); color: var(--ink); }
.n2-mi .ui15-ico { color: var(--ink-3); }
.n2-mi small { margin-left: auto; color: var(--ink-4); font-weight: 500; font-size: 15px; }
.n2-mi small .ui15-ico { color: var(--navy); }
.n2-mi-lang { cursor: default; }
.n2-seg { display: inline-flex; margin-left: auto; padding: 2px; gap: 2px; background: var(--surface-2); border-radius: 8px; }
.n2-seg > a, .n2-seg > span { height: 26px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.n2-seg > a:hover { color: var(--ink); }
.n2-seg > span[aria-current] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06); }

/* anonymous right side */
.n2-right { display: flex; align-items: center; gap: 8px; flex: none; }
.n2-btn { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-radius: 10px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.n2-btn .ui15-ico { width: 16px; height: 16px; }
.n2-btn-p { background: var(--navy); color: #fff; }
.n2-btn-p:hover { background: var(--navy-2); color: #fff; }
.n2-btn-s { background: #fff; border: 1px solid var(--line-2); color: var(--ink); }
.n2-btn-s:hover { border-color: rgba(0, 0, 0, .2); background: var(--surface); color: var(--ink); }

.n2-lang, .n2-signin { gap: 8px; }
.n2-cta { margin-left: 4px; }

/* icon button (mobile bar, drawer) */
.n2-ib { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-2); flex: none; }
.n2-ib:hover { background: var(--surface-2); }
.n2 .n2-ib .ui15-ico { width: 22px; height: 22px; }
.n2-mob { display: none; }

/* drawer (mobile) */
.n2-drawer { position: fixed; inset: 0; z-index: 90; background: #fff; display: flex; flex-direction: column; animation: n2-slide .26s var(--n2-ease); }
.n2-drawer[x-cloak] { display: none; }
@keyframes n2-slide { from { transform: translateY(12px); opacity: 0; } }
.n2-dr-h { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.n2-dr-b { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 12px 16px 24px; }
.n2-dr-sec { margin-top: 18px; }
.n2-dr-tools, .n2-dr-guide { display: block; }
.n2-dr-sec h6 { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n2-dr-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 8px 4px; text-align: left; border-bottom: 1px solid var(--line); color: var(--ink); }
.n2-dr-row:hover { color: var(--ink); }
.n2-dr-row .n2-tile-ic { width: 36px; height: 36px; }
.n2-dr-row > .ui15-ico:last-child { color: var(--ink-5); }
.n2-dr-t { display: block; flex: 1; min-width: 0; }
.n2-dr-t b { display: block; font-weight: 600; }
.n2-dr-d { display: block; font-size: 13px; color: var(--ink-3); }
.n2-dr-row.is-sm { min-height: 48px; }
.n2-dr-row.is-sm .n2-dr-t { font-weight: 500; }
.n2-dr-row.is-sm > .ui15-ico { color: var(--ink-3); }
.n2-dr-row.is-soon { cursor: default; }
.n2-dr-row.is-soon .n2-tile-ic { background: var(--surface-2); color: var(--ink-3); }
.n2-dr-row.is-main { margin-top: 12px; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--navy-soft); }
.n2-dr-row.is-main .n2-tile-ic { background: #fff; }
.n2-dr-row.is-main b { color: var(--navy); }
.n2-dr-price { margin-top: 0; }
.n2-mi.is-tall { min-height: 48px; }
.n2-dr-acct form { margin: 0; }
.n2-dr-btns { display: grid; gap: 8px; margin: 8px 0; }
.n2-dr-btns .n2-btn { height: 48px; }
.n2-dr-btns .n2-btn .ui15-ico { width: 18px; height: 18px; }
/* README § A: every tap target in the drawer is >= 44 px, including the
   pieces that are smaller on desktop (language segment, "od 39 Kč" link,
   clear button, logo). Visual size stays close; the hit area grows. */
.n2-dr-acct .n2-mi-lang { padding-top: 2px; padding-bottom: 2px; }
.n2-dr-acct .n2-seg > a, .n2-dr-acct .n2-seg > span { height: 44px; min-width: 44px; justify-content: center; }
.n2-dr-acct .n2-prem a { display: inline-flex; align-items: center; justify-content: flex-end; min-height: 44px; min-width: 44px; margin: -12px 0 -12px auto; }
.n2-search.is-full .n2-search-f { height: 44px; }
.n2 .n2-search.is-full .n2-search-x { width: 44px; height: 44px; margin-right: -8px; }
.n2-dr-h .n2-logo { min-height: 44px; }

/* breakpoints: the prototype's container queries, on the viewport, plus the
   steps the prototype lacks. Measured 2026-09-24 (cs and sk, 761..1728 px):
   the prototype's own anonymous bar overflows its content edge at EVERY
   width (by 43 px at 1728, 160+ px below 1440) and the not-paying bar by up
   to 100 px between 1280 and 1440 in sk. README § 2 says a row that does not
   fit shortens through a breakpoint, never by wrapping, so: */
@media (max-width: 1440px) { .n2-search { min-width: 300px; } }
@media (max-width: 1320px) {
  .n2-search { min-width: 260px; }
  .n2-in.has-cenik .n2-acct-n { display: none; } /* Ceník takes the e-mail's room */
  .n2-in.is-anon { gap: 16px; }
  .n2-in.is-anon .n2-nav .n2-hide-md { display: none; }
}
@media (max-width: 1200px) { .n2-acct-n { display: none; } .n2-in { gap: 16px; } .n2-search { min-width: 220px; } }
@media (max-width: 1100px) { .n2-nav .n2-hide-md { display: none; } }
@media (max-width: 1000px) { .n2-search { min-width: 160px; } .n2-item { padding: 0 9px; } .n2-in { gap: 10px; } }
@media (max-width: 900px) { .n2-in.has-cenik .n2-nav .n2-price { display: none; } .n2-search { min-width: 140px; } }
/* The anonymous bar carries three more controls than a signed-in one; below
   1200 it takes the phone bar (logo, search icon, burger) and the drawer. */
@media (max-width: 1200px) {
  .n2.is-anon .n2-nav, .n2.is-anon .n2-in > .n2-search, .n2.is-anon .n2-right, .n2.is-anon .n2-sp-8 { display: none; }
  .n2.is-anon .n2-in { gap: 4px; }
  .n2.is-anon .n2-mob { display: grid; width: 44px; height: 44px; }
}
@media (max-width: 760px) {
  .n2-in { height: 56px; gap: 4px; padding: 0 16px; }
  .n2-nav, .n2-in > .n2-search, .n2-acct-wrap, .n2-right, .n2-sp-8 { display: none; }
  .n2-sp { flex: 1; }
  .n2-mob { display: grid; }
  .n2-mob.n2-ib { width: 44px; height: 44px; }
  .n2-in > .n2-logo { min-height: 44px; }
}
.n2-dr-h .n2-ib { width: 44px; height: 44px; }
@media (min-width: 761px) { .n2:not(.is-anon) .n2-drawer { display: none !important; } }
@media (min-width: 1201px) { .n2.is-anon .n2-drawer { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  .n2 *, .n2 *::before, .n2 *::after { animation-duration: .001ms !important; transition-property: opacity !important; }
  .n2-morph, .n2-slide.is-l, .n2-slide.is-r { transform: none; }
}
