.session { display: flex; align-items: center; gap: var(--s3); flex: none; }
.session:empty { display: none; }
.ses-link { font-size: var(--fs-body); font-weight: 500; color: var(--muted); transition: color var(--t-fast) var(--ease-out); }
.ses-link:hover, .ses-link[aria-current="page"] { color: var(--text); }
.ses-login {
  display: inline-flex; align-items: center; height: 32px; padding: 0 var(--s3); border: 1px solid var(--control); border-radius: var(--round);
  color: var(--text); font-size: var(--fs-body); font-weight: 500; white-space: nowrap; transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.ses-login:hover { background: var(--raised); border-color: var(--control-hover); }
.ses-login[aria-current="page"] { background: var(--active); border-color: var(--active); }
.ses-items [role="menuitem"][aria-current="page"] { background: var(--raised); font-weight: 600; }

.ses { position: relative; }
.ses-btn {
  display: inline-flex; align-items: center; gap: var(--s2); height: 32px; padding: 0 var(--s2) 0 2px; border: 0; border-radius: var(--round);
  background: transparent; color: var(--text); font: 500 var(--fs-body)/var(--lh-body) var(--font); cursor: pointer; transition: background-color var(--t-fast) var(--ease-out);
}
.ses-btn:hover, .ses-btn[aria-expanded="true"] { background: var(--raised); }
.ses-av { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--person-bg); color: var(--person-ink); font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.01em; }
.ses-btn.bad .ses-av { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.ses-av { overflow: hidden; }
.ses-av img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ses-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ses-chev { width: 12px; height: 12px; color: var(--muted); }

.ses-menu {
  position: absolute; z-index: 20; top: calc(100% + var(--s2)); right: 0; width: 288px; max-width: calc(100vw - 32px);
  padding: var(--s2); border-radius: var(--radius-card, 14px); background: var(--surface); box-shadow: var(--shadow-float);
  font-size: var(--fs-body); line-height: var(--lh-body); text-align: left;
}
.ses-head { padding: var(--s2) var(--s2) var(--s3); }
.ses-h-name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-weight: 600; overflow-wrap: anywhere; }
.ses-h-text { min-width: 0; }
.ses-orgs { display: inline-flex; gap: var(--s2); }
.ses-org { display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--radius-small); overflow: hidden; background: var(--active); color: var(--text); font-size: var(--fs-small); font-weight: 600; }
.ses-org img { display: block; width: 24px; height: 24px; object-fit: contain; }
.ses-h-sub { margin-top: 2px; color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); overflow-wrap: anywhere; }
.ses-h-sub.bad { color: var(--pill-negative-ink); }
.ses-items [role="menuitem"] {
  display: flex; align-items: center; width: 100%; min-height: 36px; padding: 0 var(--s2); border: 0; border-radius: var(--radius-small);
  background: none; color: var(--text); font: 500 var(--fs-body)/var(--lh-body) var(--font); text-align: left; cursor: pointer;
}
.ses-items [role="menuitem"]:hover, .ses-items [role="menuitem"]:focus-visible { background: var(--active); outline: none; }
.ses-items [role="menuitem"]:focus-visible { box-shadow: inset 0 0 0 1px var(--control-hover); }
.ses-items [data-ses-logout] { color: var(--text); }
.ses-sep { height: 1px; margin: var(--s2) var(--s1); background: var(--rule); }
.ses-confirm { margin-top: var(--s1); padding: var(--s3); border-radius: var(--radius-nested); background: var(--pill-negative-bg); }
.ses-confirm p { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text); }
.ses-confirm b { display: block; margin-bottom: var(--s1); color: var(--pill-negative-ink); font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 600; }
.ses-actions { display: flex; gap: var(--s2); margin-top: var(--s3); }
.ses-act {
  display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 var(--s3); border: 1px solid var(--control); border-radius: var(--round);
  background: transparent; color: var(--text); font: 500 var(--fs-body)/var(--lh-body) var(--font); cursor: pointer; transition: background-color var(--t-fast) var(--ease-out);
}
.ses-act:hover { background: var(--active); }
.ses-act.danger { border-color: var(--negative-border); color: var(--pill-negative-ink); }
.ses-act.danger:hover { background: var(--pill-negative-bg); border-color: var(--negative); }
.ses-instead { display: inline-block; margin-top: var(--s3); font-size: var(--fs-small); color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--control); }
.ses-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 1100px) { .ses-name { display: none; } .ses-btn { padding-right: 6px; } }
@media (max-width: 900px) { .session .ses-link { display: none; } }
html[lang="it"] .bar-right .search { width: 392px; }
.bar-right .search { width: 392px; }
.bar-right { min-width: 0; }
.bar-right .search { flex: 0 1 auto; min-width: 160px; }
@media (min-width: 901px) and (max-width: 1100px) {
  .bar-inner { gap: var(--s4); } .bar-links { gap: var(--s4); }
  html[lang] .bar-right .search, .bar-right .search { flex: none; width: clamp(160px, calc(100vw - 632px), 392px); }
}
html[data-logged-in] [data-when-out] { display: none; }
[data-session="compact"] .ses-name { display: none; }
[data-session="compact"] .ses-btn { padding-right: 6px; }
@media (min-width: 1080px) { .toprow:has(.session) { gap: var(--s5); } }

a, span, bdi, td, th, dd, li, option, label { unicode-bidi: isolate; }

:is(.foot, .foot-u) a[data-canary][data-canary-state="stale"], :is(.foot, .foot-u) a[data-canary][data-canary-state="none"] { color: var(--pill-warning-ink); }


.skip {
  position: absolute; z-index: 40; top: var(--s2); left: var(--s4); padding: var(--s2) var(--s3); border-radius: var(--round);
  background: var(--primary); color: var(--primary-ink); font: 500 var(--fs-body)/var(--lh-body) var(--font);
  transform: translateY(calc(-100% - var(--s4))); transition: transform var(--t-fast) var(--ease-out);
}
.skip:focus, .skip:focus-visible { transform: none; outline: 2px solid var(--text); outline-offset: 2px; }

.search-key {
  position: absolute; top: 7px; right: 8px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px;
  border: 1px solid var(--control); border-radius: var(--radius-small); color: var(--faint); font: 500 var(--fs-small)/1 var(--font); pointer-events: none;
}
.search:focus-within .search-key, .search:has(input:not(:placeholder-shown)) .search-key { display: none; }
.bar-right .search input { padding-right: 32px; }

.ses-pref {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; flex: none;
  background: transparent; color: var(--muted); cursor: pointer; transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.ses-pref svg { width: 16px; height: 16px; }
.ses-pref:hover, .ses-pref[aria-expanded="true"] { background: var(--raised); color: var(--text); }
.ses-out .ses-menu { width: 272px; }

.ses-set { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 40px; padding: 0 var(--s1) 0 var(--s2); }
.ses-set-k { color: var(--muted); }
.ses-seg { display: inline-flex; flex: none; padding: 2px; border-radius: var(--round); background: var(--active); }
.ses-seg [role="menuitemradio"] {
  height: 28px; padding: 0 var(--s3); border: 0; border-radius: var(--round); background: transparent; color: var(--muted);
  font: 500 var(--fs-small)/var(--lh-small) var(--font); cursor: pointer; transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.ses-seg [role="menuitemradio"]:hover { color: var(--text); }
.ses-seg [role="menuitemradio"][aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--control); }
.ses-seg [role="menuitemradio"]:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.ses-keys { padding: var(--s2) var(--s2) var(--s1); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.ses-keys-h { margin-bottom: var(--s1); color: var(--text); font-weight: 600; }
.ses-keys p:not(.ses-keys-h) { display: flex; align-items: center; gap: var(--s2); padding: 2px 0; }
.ses-keys kbd { min-width: 44px; }
.ses-keys kbd, .ta-enter {
  display: inline-grid; place-items: center; min-width: 24px; height: 20px; padding: 0 var(--s1); flex: none;
  border: 1px solid var(--control); border-radius: var(--radius-small); color: var(--text); font: 500 var(--fs-small)/1 var(--font);
}

form.has-ta { position: relative; }
.ta {
  position: absolute; z-index: 25; top: calc(100% + var(--s2)); left: 0; right: 0; min-width: 300px; padding: var(--s2);
  border-radius: var(--radius-card, 14px); background: var(--surface); box-shadow: var(--shadow-float);
  text-align: left; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text);
}
.bar-right .ta { left: auto; width: 360px; }
.ta-list[hidden], .ta-note[hidden] { display: none; }
.ta-opt { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: var(--s2); border-radius: var(--radius-small); color: var(--text); }
.ta-opt[aria-selected="true"], .ta-opt:hover { background: var(--active); }
.ta-av { display: grid; place-items: center; width: 28px; height: 28px; flex: none; overflow: hidden; border-radius: 50%; background: var(--person-bg); color: var(--person-ink); font-size: var(--fs-small); font-weight: 600; }
.ta-av.org { border-radius: var(--radius-small); background: var(--active); color: var(--text); }
.ta-av img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ta-av.org img { object-fit: contain; }
.ta-txt { display: grid; min-width: 0; flex: 1; }
.ta-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ta-addr { color: var(--muted); font-weight: 400; }
.ta-alert { margin-top: 2px; color: var(--pill-warning-ink); font-size: var(--fs-small); line-height: var(--lh-small); white-space: normal; }
.ta-sub { display: flex; align-items: center; gap: var(--s2); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.ta-links { display: inline-flex; gap: var(--s1); }
.ta-links svg { width: 14px; height: 14px; color: var(--muted); }
form .ta svg { position: static; top: auto; left: auto; }
.ta-enter { visibility: hidden; color: var(--muted); }
.ta-opt[aria-selected="true"] .ta-enter { visibility: visible; }
.ta-make { min-height: 36px; font-weight: 500; }
.ta-note { padding: var(--s2); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.ta[hidden] { display: none !important; }
.ta-anchor { position: relative; }
.ta.ta-field { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.ta.ta-above { top: auto; bottom: calc(100% + var(--s2)); }
.ta-head { padding: var(--s1) var(--s2) var(--s2); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.ta-head[hidden] { display: none; }
.ta-field .ta-opt { cursor: pointer; }

.crumb { margin-top: var(--s5); }
.crumb a { display: inline-flex; align-items: center; gap: var(--s1); color: var(--muted); font-weight: 500; transition: color var(--t-fast) var(--ease-out); }
.crumb a:hover { color: var(--text); }
.crumb svg { width: 12px; height: 12px; }
.crumb + .state, .crumb + noscript + .state { margin-top: var(--s4); }
.crumb[hidden] { display: none; }

.lost { max-width: 752px; margin-top: var(--s6); }
.lost[hidden] { display: none; }
.lost-h { margin-bottom: var(--s3); font-size: var(--fs-section); line-height: var(--lh-section); font-weight: 600; }
.lost .search { width: 100%; }
.lost .search input { height: 44px; padding-left: 40px; font-size: var(--fs-section); background: var(--field, var(--surface)); border: 1px solid var(--control); }
.lost .search > svg { top: 15px; left: 15px; }
.lost-make { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s4); color: var(--muted); }
.lost-make .btn { height: 32px; }
@media (max-width: 760px) { .lost .search input { font-size: 16px; } .ta { min-width: 0; } .bar-right .ta { width: auto; } }

@media (hover: none) and (pointer: coarse) { .ses-keys, .search-key, .ta-enter { display: none; } }

.foot [data-theme-switch] { display: none; }

@media (prefers-reduced-motion: reduce) { .ses-btn, .ses-login, .ses-act, .ses-pref, .ses-seg [role="menuitemradio"], .crumb a, .skip { transition: none; } }

.err-state { margin-top: var(--s6); }
.err-state .lost { margin-top: var(--s5); }
.err-state .lost .search input { background: var(--ground); }
.err-where { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); margin-top: var(--s5); color: var(--muted); }
.err-where a.inline { color: var(--text); }
body[data-page="error"] .foot { padding-bottom: var(--s6); }

html[data-theme-switching] *, html[data-theme-switching] *::before, html[data-theme-switching] *::after { transition: none !important; }
.topbar .menu-sheet.open {
  position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100svh - 56px); overflow-y: auto; overscroll-behavior: contain;
  box-shadow: var(--shadow-float);
}
@media (prefers-reduced-motion: no-preference) {
  .ses-menu, .ta, .topbar .menu-sheet { transition: opacity var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); }
  @starting-style {
    .ses-menu:not([hidden]), .ta:not([hidden]), .topbar .menu-sheet.open { opacity: 0; transform: translateY(-4px); }
  }
}
[data-ago-on] { font-variant-numeric: tabular-nums; white-space: nowrap; }

@font-face { font-family: "Veil Mono Fallback A"; src: local("Menlo Regular"), local("Menlo-Regular"), local("DejaVu Sans Mono"), local("DejaVuSansMono"); size-adjust: 99.66%; ascent-override: 102.35%; descent-override: 30.1%; line-gap-override: 0%; }
@font-face { font-family: "Veil Mono Fallback B"; src: local("Consolas"); size-adjust: 109.13%; ascent-override: 93.47%; descent-override: 27.49%; line-gap-override: 0%; }
@font-face { font-family: "Veil Mono Fallback C"; src: local("Courier New"), local("CourierNewPSMT"), local("Liberation Mono"), local("LiberationMono"), local("Droid Sans Mono"), local("DroidSansMono"); size-adjust: 99.98%; ascent-override: 102.02%; descent-override: 30.01%; line-gap-override: 0%; }

[data-said] { position: relative; color: transparent !important; }
[data-said]::after { content: attr(data-said); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--positive); font-weight: 500; white-space: nowrap; pointer-events: none; }
.text-btn[data-said]::after { justify-content: flex-start; }
[data-said][data-said-bad]::after { color: var(--pill-negative-ink); }

.session .ses-link { display: inline-flex; justify-content: flex-end; min-width: 44px; }
.ses-login { justify-content: center; min-width: 73px; }
.session:empty { display: flex; width: 173px; }
[data-session="compact"]:empty { width: 117px; }
html:is([data-ses="ok"], [data-ses="bad"]) .session:empty { width: calc(66px + var(--ses-name, 0px)); }
html:is([data-ses="ok"], [data-ses="bad"]) [data-session="compact"]:empty { width: 56px; }
@media (max-width: 1100px) { html:is([data-ses="ok"], [data-ses="bad"]) .session:empty { width: 56px; } }
@media (max-width: 900px) { .session:empty { width: 117px; } }

.crumb[data-reserve] { min-height: var(--lh-body); }
html[data-ses="ok"] .crumb[data-reserve][hidden] { display: block !important; visibility: hidden; }
