/* Shared visual refinements; content of later survey/validation stages is unchanged. */
.phase-oct2 {
  --ui-label-ease: cubic-bezier(.22, 1, .36, 1);
  background: radial-gradient(ellipse at 85% 10%, #e0dcf9, transparent 55%),
    radial-gradient(ellipse at 10% 85%, #e3eaf5, transparent 55%), #edf0f7;
  isolation: isolate;
}
.phase-oct2::before {
  content: "";
  position: fixed;
  inset: -48px;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, #a5a9d6 1px, transparent 1.5px),
    linear-gradient(60deg, transparent 49.5%, #9a9fc516 50%, transparent 50.5%);
  background-size: 36px 36px, 144px 144px;
  opacity: .36;
  animation: ui-data-drift 28s ease-in-out infinite alternate;
}
@keyframes ui-data-drift {
  to { transform: translate3d(36px, -24px, 0); opacity: .24; }
}
/* Brand chrome: translucent surfaces, a restrained accent line and partner lockups. */
.app-header {
  background: linear-gradient(110deg, #ffffffef, #f9f8ffed);
  border-bottom: 1px solid #dcdff0;
  box-shadow: 0 8px 30px #57548609;
}
.app-header::before, .app-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #6957e4, #c3b8f1 35%, #e4e8f5 75%, #8c7cda);
  pointer-events: none;
}
.app-header__mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(135deg, #3f32cb, #8574e9);
  box-shadow: 0 6px 18px #5948c930, inset 0 1px 0 #ffffff50;
  outline: 4px solid #eeebfc;
  transition: transform .35s var(--ui-label-ease, ease);
}
.app-header__brand:hover .app-header__mark { transform: rotate(-6deg); }
.app-header__brand small { margin-top: 5px; letter-spacing: .25px; }
.app-header__context {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 22px;
  margin-right: 3px;
  border-right: 1px solid #e0e2f0;
  font-size: 11px;
  color: #8388a2;
}
.app-header__context .ui-icon { width: 15px; height: 15px; color: #9488d4; }
.ui-account summary { background: #ffffffc9; border-color: #e4e2f2; box-shadow: 0 3px 12px #443b7c06; padding: 7px 10px; gap: 11px; }
.ui-account__avatar { width: 34px; height: 34px; background: linear-gradient(135deg, #efebff, #e5e8fa); border-radius: 12px; }
.ui-account__copy { display: grid; gap: 3px; min-width: 0; }
.ui-account__copy small { font-size: 9px; font-weight: 400; color: #8a8fa6; }
.ui-account__copy strong { font-size: 12px; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.ui-account[open] summary > .ui-chevron { transform: rotate(180deg); }
.app-footer {
  position: relative;
  min-height: 88px;
  padding-top: 14px;
  padding-bottom: 14px;
  background: linear-gradient(110deg, #fcfdff, #f7f6fd);
}
.has-app-chrome { --app-footer-h: 88px; }
.app-footer__identity { flex-direction: row; align-items: center; gap: 12px; }
.app-footer__identity > div { display: grid; gap: 5px; }
.app-footer__identity span { display: block; }
.app-footer__identity strong { letter-spacing: -.2px; }
.app-footer__mark { display: grid !important; place-items: center; width: 34px; height: 34px; border-radius: 12px; border: 1px solid #e5e0f4; background: #efebfa; color: #7a6bc9; }
.app-footer__mark .ui-icon { width: 18px; height: 18px; }
.app-footer__partners { gap: 24px; }
.app-footer__partner { display: flex; align-items: center; gap: 12px; }
.app-footer__partner + .app-footer__partner { border-left: 1px solid #e1e3ef; padding-left: 24px; }
.app-footer__partner img { width: auto; height: 38px; max-width: 90px; }
.app-footer__partner span { display: grid !important; gap: 4px; font-size: 11px; color: #5b6380; font-weight: 500; }
.app-footer__partner small { font-size: 9px; color: #9298ad; font-weight: 400; }
/* Shared floating-label motion: CSS reacts to focus, filled values and browser autofill. */
.phase-oct2 #createProjectModal .projects-field label,
.phase-oct2 .ui-floating-field label {
  top: 19px;
  transform: translateY(0) scale(1);
  transform-origin: left top;
  transition: transform .34s var(--ui-label-ease), color .25s ease;
  font-weight: 500;
  font-size: 14px;
  pointer-events: none;
}
.phase-oct2 #createProjectModal .projects-field :is(input, textarea):focus ~ label,
.phase-oct2 #createProjectModal .projects-field :is(input, textarea):not(:placeholder-shown) ~ label,
.phase-oct2 .ui-floating-field input:focus ~ label,
.phase-oct2 .ui-floating-field input:not(:placeholder-shown) ~ label {
  top: 19px;
  font-size: 14px;
  transform: translateY(-11px) scale(.76);
  color: #6c5cc5;
}
.phase-oct2 :is(.ui-floating-field, .projects-field) input:autofill ~ label {
  transform: translateY(-11px) scale(.76);
}
.phase-oct2 .feature-control > .ui-floating-label {
  transition: transform .32s var(--ui-label-ease), color .25s ease;
  transform-origin: left center;
}
.phase-oct2 .feature-control select:focus ~ .ui-floating-label { transform: translateY(-2px); color: #6956c5; }
.phase-oct2 .projects-list[data-view=cards] .projects-row-delete { top: 22px; right: 18px; }
/* Equal intrinsic button sizing prevents anchor/button baseline differences in action rows. */
.sentiment-topbar__actions, .sentiment-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  max-width: 100%;
}
.sentiment-topbar__actions > :is(a, button), .sentiment-header-actions > :is(a, button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  line-height: 1.25;
}
/* Login uses the same surfaces and controls as the scoped project pages. */
.phase-oct2 .login-page { min-height: 100dvh; padding: 36px 28px; background: transparent; animation: none; }
.phase-oct2 .login-backdrop { display: none; }
.phase-oct2 .login-layout { width: min(1120px, 100%); min-height: 580px; gap: 32px; grid-template-columns: 1.08fr .92fr; align-items: center; }
.phase-oct2 .login-hero { border: 0; border-radius: 0; background: transparent; backdrop-filter: none; box-shadow: none; padding: 38px 30px; min-height: 0; }
.phase-oct2 .login-hero-logos { gap: 24px; margin-bottom: 38px; }
.phase-oct2 .login-hero-logo { max-height: 60px; max-width: 180px; filter: none; }
.phase-oct2 .login-hero-logo--unipd { max-width: 64px; max-height: 64px; }
.phase-oct2 .login-hero-logo-divider { height: 40px; background: #c9cce1; }
.phase-oct2 .login-hero-eyebrow { display: flex; align-items: center; gap: 9px; font-size: 10px; letter-spacing: 1.4px; color: #8378bb; }
.phase-oct2 .login-hero-title { font-size: clamp(32px, 4vw, 49px); line-height: 1.18; letter-spacing: -1.8px; text-shadow: none; }
.phase-oct2 .login-hero-title .text-accent { color: #6852d8; }
.phase-oct2 .login-hero-lede { font-size: 15px; line-height: 1.85; margin-top: 22px; color: #78829c; }
.phase-oct2 .login-hero-points { gap: 14px; margin-top: 30px; }
.phase-oct2 .login-hero-points li { font-size: 12px; color: #69748f; }
.phase-oct2 .login-hero-points li::before { width: 6px; height: 6px; background: #9383df; box-shadow: 0 0 0 4px #dcd7f680; }
.phase-oct2 .login-card { padding: 38px; border: 1px solid #ffffffc9; border-radius: 28px; background: #ffffffde; backdrop-filter: blur(20px); box-shadow: 0 24px 70px #777ba71c, inset 0 1px 0 #fff; }
.phase-oct2 .login-card-accent { display: block; position: absolute; top: 0; left: 28px; right: 28px; height: 3px; background: linear-gradient(90deg, #7966df, #dcd5fb, transparent); }
.login-welcome-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 17px; color: #715cd3; background: linear-gradient(135deg, #f2eeff, #e8e9fb); border: 1px solid #e6e1f6; margin-bottom: 28px; }
.login-welcome-mark .ui-icon { width: 24px; height: 24px; }
.login-card-eyebrow { color: #8f88a8; text-transform: uppercase; font-size: 9px; letter-spacing: 1.8px; margin: 0 0 12px; }
.phase-oct2 .login-card-title { font-size: 28px; letter-spacing: -.8px; text-shadow: none; }
.phase-oct2 .login-card-subtitle { font-size: 13px; color: #8891a6; margin-top: 8px; }
.phase-oct2 .login-form { margin-top: 28px; gap: 18px; }
.ui-floating-field { position: relative; }
.phase-oct2 .ui-floating-field input { box-sizing: border-box; width: 100%; height: 64px; border: 1px solid #e1e4ef; border-radius: 14px; background: #f8f9fd; padding: 26px 15px 10px; font: 14px Outfit, sans-serif; color: #3e4863; transition: border-color .25s, box-shadow .25s, background .25s; }
.phase-oct2 .ui-floating-field label { position: absolute; left: 15px; right: 52px; line-height: 1.5; color: #8991a7; white-space: nowrap; }
.phase-oct2 .ui-floating-field input:focus { outline: none; background: #fff; border-color: #a193df; box-shadow: 0 0 0 4px #9687e912; }
.phase-oct2 .login-password-field input { padding-right: 52px; }
.phase-oct2 .login-password-toggle { right: 8px; color: #9298af; }
.phase-oct2 #loginSubmitBtn { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 48px; margin-top: 4px; padding: 14px 18px; font-size: 13px; font-weight: 600; border: 1px solid #6e5acf; border-radius: 13px; background: linear-gradient(120deg, #5140ca, #7a65de); box-shadow: 0 8px 22px #6b58cc24; }
.phase-oct2 #loginSubmitBtn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 28px #6b58cc32; }
/* Reveal existing text without modifying or repeatedly announcing its accessible content. */
.login-view :is(.login-hero-eyebrow, .login-hero-title, .login-hero-lede, .login-hero-points li) { animation: login-text-reveal 1.2s steps(36, end) both; }
.login-view .login-hero-title { animation-delay: .1s; }
.login-view .login-hero-lede { animation-delay: .22s; }
.login-view .login-hero-points li:nth-child(1) { animation-delay: .35s; }
.login-view .login-hero-points li:nth-child(2) { animation-delay: .45s; }
.login-view .login-hero-points li:nth-child(3) { animation-delay: .55s; }
@keyframes login-text-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@media (max-width: 900px) {
  .app-header__context { display: none; }
  .app-footer__partner span { display: none !important; }
  .app-footer__partner + .app-footer__partner { padding-left: 16px; }
  .app-footer__partners { gap: 16px; }
  .phase-oct2 .login-layout { gap: 12px; }
  .phase-oct2 .login-hero { padding: 24px 14px; }
  .phase-oct2 .login-card { padding: 30px; }
}
@media (max-width: 640px) {
  .has-app-chrome { --app-footer-h: 76px; }
  .app-footer { min-height: 76px; padding: 12px; }
  .app-footer__identity { gap: 8px; }
  .app-footer__mark { width: 28px; height: 28px; }
  .app-footer__identity > div > span { display: none; }
  .app-footer__partner { gap: 0; }
  .app-footer__partner img { max-width: 72px; height: 28px; }
  .app-footer__partner img:last-child { height: 32px; }
  .app-footer__partner + .app-footer__partner { padding-left: 12px; }
  .app-footer__partners { gap: 12px; }
  .ui-account summary { gap: 8px; padding: 6px 8px; }
  .ui-account__avatar { width: 28px; height: 28px; }
  .ui-account__copy small { display: none; }
  .ui-account__copy strong { font-size: 10px; max-width: 85px; }
  .phase-oct2 .login-page { padding: 22px 16px; }
  .phase-oct2 .login-layout { grid-template-columns: 1fr; min-height: 0; max-width: 420px; gap: 24px; }
  .phase-oct2 .login-hero { padding: 16px 12px 0; }
  .phase-oct2 .login-hero-logos { margin-bottom: 24px; }
  .phase-oct2 .login-hero-title { font-size: 34px; }
  .phase-oct2 .login-hero-lede { font-size: 13px; margin-top: 14px; }
  .phase-oct2 .login-hero-points { display: none; }
  .phase-oct2 .login-card { padding: 28px; }
  .login-welcome-mark { margin-bottom: 20px; width: 44px; height: 44px; }
  .sentiment-topbar__actions, .sentiment-header-actions { width: 100%; justify-content: flex-start; margin-left: 0; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .phase-oct2::before, .login-view :is(.login-hero-eyebrow, .login-hero-title, .login-hero-lede, .login-hero-points li) { animation: none; }
  .phase-oct2 #createProjectModal .projects-field label, .phase-oct2 .ui-floating-field label, .phase-oct2 .feature-control > .ui-floating-label, .app-header__mark { transition: none; }
}
.app-header__back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid #e4e1f2;
  border-radius: 11px;
  color: #7b6cae;
  background: #ffffffa8;
  font-size: 11px;
  text-decoration: none;
}
.app-header__back .ui-icon { width: 16px; height: 16px; }
@media (max-width: 640px) {
  .app-header:has(.app-header__back) { flex-wrap: wrap; }
  .app-header:has(.app-header__back) .app-header__nav { margin-left: auto; }
  .app-header__back { order: 2; width: 100%; border: 0; background: #f1eff8; }
  .ui-account__copy strong { max-width: 64px; }
}
/* Search focus moves the complete control without shifting neighbouring controls. */
.phase-oct2 .ui-search {
  position: relative;
  transform-origin: center;
  transition: transform .25s var(--ui-label-ease), box-shadow .25s ease, background-color .25s ease;
}
.phase-oct2 .ui-search:focus-within {
  border-color: #e0e4f0;
  background: #fff;
  box-shadow: 0 14px 12px -12px #7664cd80;
  transform: scale(1.04);
  z-index: 1;
  color: #7664c9;
}
.phase-oct2 .ui-search input:is(:focus, :focus-visible) {
  outline: none;
  box-shadow: none;
  border: 0;
}
.projects-search-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 20px;
}
.phase-oct2 #projectResultCount { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.phase-oct2 #projectResultCount.is-filtered {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  background: #eeeafa;
  color: #6956b3;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
#clearProjectSearch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8a7bbb;
  font: 500 11px Outfit, sans-serif;
}
#clearProjectSearch:hover { background: #eeeafa; }
#clearProjectSearch .ui-icon { width: 14px; height: 14px; }
/* Cursor changes are native and immediate; disabled controls stay distinguishable. */
:is(button:enabled, a[href], summary, select:enabled,
  input[type="checkbox"]:enabled, input[type="radio"]:enabled, input[type="range"]:enabled,
  [role="button"], [role="switch"], [role="tab"], [role="checkbox"]):not([aria-disabled="true"]) {
  cursor: pointer;
}
:is(button:disabled, select:disabled, [aria-disabled="true"]) { cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
  .phase-oct2 .ui-search { transition: none; }
}
