/* Atmospheric effects and floating navigation for Nexo. */
html {
  background: #06070d;
}

body {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 56% -8%, rgba(47, 63, 140, 0.2), transparent 34%),
    radial-gradient(circle at 100% 34%, rgba(93, 43, 146, 0.09), transparent 27%),
    linear-gradient(180deg, #080910 0%, #090a12 55%, #0a0713 100%);
}

:root {
  --glass-card:
    linear-gradient(145deg, rgba(24, 26, 42, 0.64), rgba(10, 11, 19, 0.54));
  --glass-card-hover:
    linear-gradient(145deg, rgba(29, 32, 50, 0.7), rgba(12, 13, 22, 0.6));
  --glass-border: rgba(159, 171, 224, 0.13);
  --glass-highlight: rgba(255, 255, 255, 0.035);
}

.shell {
  position: relative;
  z-index: 2;
}

.wave-shader-canvas {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}

body.webgl-shader-ready .ambient-shader {
  opacity: 0.16;
  animation: shader-webgl-drift 31s cubic-bezier(0.42, 0, 0.3, 1) infinite;
}

/* Wide bottom aurora reconstructed from the motion reference video. */
.ambient-shader {
  position: fixed;
  z-index: 0;
  right: -7vw;
  bottom: -17vh;
  left: 238px;
  height: 74vh;
  pointer-events: none;
  opacity: 0.68;
  background:
    radial-gradient(ellipse 42% 58% at 10% 108%, rgba(87, 30, 196, 0.5) 0%, rgba(63, 20, 151, 0.2) 47%, transparent 74%),
    radial-gradient(ellipse 54% 76% at 51% 116%, rgba(126, 48, 255, 0.64) 0%, rgba(91, 27, 211, 0.29) 43%, transparent 72%),
    radial-gradient(ellipse 48% 61% at 93% 108%, rgba(96, 37, 223, 0.48) 0%, rgba(57, 19, 138, 0.18) 48%, transparent 76%),
    linear-gradient(to top, rgba(61, 18, 140, 0.28), transparent 72%);
  filter: saturate(1.28) blur(7px);
  transform-origin: 50% 100%;
  transition: filter 1.2s ease;
  animation: shader-drift 24s cubic-bezier(0.42, 0, 0.3, 1) infinite;
}

.ambient-shader::before {
  position: absolute;
  inset: 5% -8% 9%;
  content: "";
  border-radius: 46% 54% 10% 10% / 65% 58% 12% 12%;
  background:
    radial-gradient(ellipse 25% 39% at 13% 82%, rgba(132, 63, 255, 0.62), transparent 72%),
    radial-gradient(ellipse 37% 42% at 43% 74%, rgba(145, 70, 255, 0.76), rgba(101, 38, 226, 0.25) 49%, transparent 76%),
    radial-gradient(ellipse 32% 47% at 73% 84%, rgba(118, 48, 247, 0.66), transparent 73%),
    radial-gradient(ellipse 24% 36% at 98% 70%, rgba(82, 40, 203, 0.55), transparent 75%);
  filter: blur(36px);
  transform: translate3d(-4%, 8%, 0) skewX(-5deg) scaleX(1.08);
  transition: filter 900ms ease, opacity 900ms ease;
  animation: shader-surface 21s ease-in-out infinite;
}

.ambient-shader::after {
  position: absolute;
  inset: 14% -22% 16%;
  content: "";
  border-radius: 50%;
  background:
    linear-gradient(
      112deg,
      transparent 13%,
      rgba(114, 50, 242, 0.05) 26%,
      rgba(183, 112, 255, 0.34) 39%,
      rgba(115, 48, 239, 0.09) 50%,
      rgba(196, 128, 255, 0.27) 62%,
      rgba(89, 39, 210, 0.04) 76%,
      transparent 88%
    );
  filter: blur(24px);
  mask-image: radial-gradient(ellipse 68% 62% at 50% 78%, #000 0%, rgba(0, 0, 0, 0.92) 47%, transparent 84%);
  animation: shader-ripple 19s ease-in-out infinite;
}

.ambient-shader.is-reacting::before {
  opacity: 0.82;
  filter: blur(31px) brightness(1.055) saturate(1.1);
}

.ambient-shader.is-reacting {
  filter: saturate(1.36) blur(6px) brightness(1.04);
}

/* Tiny rising particles are generated by ambient.js. */
.particle-field {
  position: fixed;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(to top, #000 0%, #000 68%, transparent 100%);
}

.ambient-particle {
  --size: 3px;
  --left: 50%;
  --duration: 13s;
  --delay: 0s;
  --drift: 30px;
  position: absolute;
  bottom: -18px;
  left: var(--left);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: rgba(193, 151, 255, 0.94);
  box-shadow:
    0 0 calc(var(--size) * 2.5) rgba(160, 101, 255, 0.8),
    0 0 calc(var(--size) * 6) rgba(107, 72, 255, 0.3);
  opacity: 0;
  animation: particle-rise var(--duration) linear var(--delay) infinite;
}

/*
 * Click interaction is projected into the shader instead of drawing effects
 * around the cursor. The two pseudo-elements become waves on the aurora plane.
 */
.shader-impact {
  --impact-strength: 1;
  position: fixed;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 230px;
  height: 190px;
  pointer-events: none;
  opacity: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse, rgba(159, 94, 237, 0.42) 0%, rgba(112, 58, 207, 0.2) 37%, transparent 72%);
  filter: blur(14px);
  transform: translate(-50%, -50%) scale(0.25);
  animation: shader-impact-bloom 1.9s cubic-bezier(0.18, 0.72, 0.2, 1) forwards;
}

.shader-impact::before {
  position: absolute;
  right: 50%;
  bottom: calc(50% - 12px);
  width: 104px;
  height: 30px;
  content: "";
  border: 1px solid rgba(186, 137, 239, 0.48);
  border-radius: 50%;
  box-shadow:
    0 0 15px rgba(142, 85, 218, 0.2),
    0 0 22px rgba(104, 69, 181, 0.1) inset;
  opacity: 0;
  transform: translateX(50%) perspective(240px) rotateX(64deg) scale(0.35);
  animation: shader-impact-wave 1.75s cubic-bezier(0.16, 0.72, 0.2, 1) 70ms forwards;
}

.ambient-particle:nth-child(4n) {
  background: rgba(118, 157, 255, 0.95);
  box-shadow:
    0 0 calc(var(--size) * 3) rgba(112, 153, 255, 0.75),
    0 0 calc(var(--size) * 6) rgba(72, 98, 212, 0.26);
}

.ambient-particle:nth-child(7n) {
  background: rgba(232, 201, 160, 0.86);
}

/* Floating/inset treatment derived from the second reference. */
.sidebar {
  inset: 14px auto 14px 14px;
  width: 238px;
  border: 1px solid rgba(158, 168, 215, 0.12);
  border-radius: 19px;
  background:
    linear-gradient(155deg, rgba(22, 24, 37, 0.91), rgba(10, 11, 18, 0.87));
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.018) inset,
    0 18px 70px rgba(68, 43, 140, 0.1);
  backdrop-filter: blur(28px) saturate(1.12);
  overflow: hidden;
}

.sidebar::before {
  position: absolute;
  z-index: -1;
  top: -90px;
  left: -65px;
  width: 230px;
  height: 230px;
  content: "";
  border-radius: 50%;
  background: rgba(93, 107, 213, 0.12);
  filter: blur(45px);
  pointer-events: none;
}

.brand {
  height: 80px;
  padding-inline: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
}

.sidebar nav {
  padding: 25px 12px;
}

.sidebar nav button.active::before {
  left: -13px;
}

.local {
  margin-inline: 12px;
  background: rgba(5, 7, 13, 0.23);
}

main {
  margin-left: 266px;
}

main > header {
  margin-right: 14px;
  padding-left: 28px;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition:
    background 360ms ease,
    box-shadow 360ms ease,
    backdrop-filter 360ms ease;
}

main > header.is-scrolled {
  background: rgba(9, 10, 16, 0.68);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

.sidebar .brand {
  border-top: 0;
  border-bottom: 0;
}

.sidebar .profile {
  border-top: 0;
  border-bottom: 0;
  position: relative;
  display: block;
  min-height: 0;
  padding: 8px 12px 14px;
}

.profile-identity {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease;
}

.profile-identity:hover,
.profile-identity[aria-expanded="true"] {
  background: rgba(112, 153, 255, .055);
}

.profile-identity > i {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(232, 201, 160, .3);
  border-radius: 50%;
  background: rgba(232, 201, 160, .08);
  color: var(--gold);
  font: 600 11px var(--font-barlow);
  font-style: normal;
}

.profile-identity > span {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.profile-menu {
  position: absolute;
  z-index: 40;
  right: 14px;
  bottom: calc(100% - 5px);
  left: 14px;
  padding: 10px;
  border: 1px solid rgba(112, 153, 255, .2);
  border-radius: 14px;
  background: rgba(9, 10, 24, .94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(24px);
}

.profile-menu[hidden] {
  display: none;
}

.profile-menu > small {
  display: block;
  padding: 6px 10px 9px;
  color: #747c9f;
  font: 600 9px var(--font-barlow);
  letter-spacing: .2em;
}

.profile-menu > button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #cdd3eb;
  font-size: 12px;
  text-align: left;
  transition: background .18s ease, color .18s ease;
}

.profile-menu > button:hover {
  background: rgba(112, 153, 255, .09);
  color: #f2f4ff;
}

.profile-menu > button i {
  display: grid;
  width: 24px;
  place-items: center;
  color: #7099ff;
  font-style: normal;
}

.profile-menu > button span {
  display: block;
}

.profile-menu > .profile-signout {
  color: #eab9b9;
}

.profile-menu > .profile-signout:hover {
  background: rgba(231, 117, 117, .09);
  color: #ffd6d6;
}

.profile-menu > .profile-signout i {
  color: #e58d8d;
}

/*
 * One glass material across the full product. The violet shader and rising
 * particles remain visible through the cards, but text keeps its contrast.
 */
.capture,
.preview,
.panel,
.metrics article,
.entry,
.register,
.privacy,
.big,
.tip,
.summary,
.insight {
  border-color: var(--glass-border);
  background: var(--glass-card);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.22),
    0 1px 0 var(--glass-highlight) inset;
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

/*
 * Card hover depth: a restrained local spotlight follows the pointer.
 * The effect reinforces hierarchy without competing with the background shader.
 */
.ambient-card-interactive {
  --card-pointer-x: 50%;
  --card-pointer-y: 50%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition:
    transform 320ms ease,
    border-color 320ms ease,
    box-shadow 320ms ease;
}

.ambient-card-interactive::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      280px circle at var(--card-pointer-x) var(--card-pointer-y),
      rgba(125, 158, 255, 0.055) 0%,
      rgba(159, 100, 229, 0.025) 34%,
      transparent 72%
    );
  transition: opacity 380ms ease;
}

.ambient-card-interactive > * {
  position: relative;
  z-index: 1;
}

.ambient-card-interactive:hover {
  border-color: rgba(162, 178, 235, 0.175);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.23),
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 0 26px rgba(75, 84, 177, 0.025);
  transform: translateY(-1px);
}

.ambient-card-interactive:hover::after {
  opacity: 0.68;
}

.capture,
.big {
  background:
    radial-gradient(circle at 88% 0%, rgba(99, 87, 200, 0.13), transparent 38%),
    var(--glass-card);
}

.preview {
  background:
    radial-gradient(circle at 8% 0%, rgba(63, 209, 184, 0.08), transparent 34%),
    var(--glass-card);
}

.insight {
  background:
    radial-gradient(circle at 0 50%, rgba(232, 201, 160, 0.08), transparent 28%),
    var(--glass-card);
}

.entry:hover,
.metrics article:hover,
.panel:hover,
.tip:hover {
  border-color: rgba(159, 171, 224, 0.2);
  background: var(--glass-card-hover);
}

.capture textarea,
.register textarea,
.register input,
.register > aside,
.local {
  border-color: rgba(159, 171, 224, 0.1);
  background: rgba(4, 5, 12, 0.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.donut > span {
  border-color: rgba(182, 193, 235, 0.16);
  background: rgba(7, 8, 16, 0.78);
  box-shadow:
    0 0 30px rgba(4, 5, 12, 0.3) inset,
    0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.donut > span strong {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.donut > span small {
  color: #c2c8df;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.9);
}

.bar > i {
  box-shadow:
    0 0 18px rgba(90, 127, 255, 0.16),
    0 10px 28px rgba(49, 73, 157, 0.16);
}

@keyframes shader-drift {
  0% {
    opacity: 0.42;
    transform: translate3d(-1.5%, 13%, 0) scaleX(0.95) scaleY(0.88);
  }
  22% {
    opacity: 0.66;
    transform: translate3d(1.5%, 1%, 0) scaleX(1.02) scaleY(1);
  }
  46% {
    opacity: 0.8;
    transform: translate3d(-1%, -7%, 0) scaleX(1.07) scaleY(1.13);
  }
  69% {
    opacity: 0.73;
    transform: translate3d(2.5%, -2%, 0) scaleX(1.01) scaleY(1.06);
  }
  84% {
    opacity: 0.55;
    transform: translate3d(-0.5%, 7%, 0) scaleX(0.98) scaleY(0.94);
  }
  100% {
    opacity: 0.42;
    transform: translate3d(-1.5%, 13%, 0) scaleX(0.95) scaleY(0.88);
  }
}

@keyframes shader-webgl-drift {
  0%, 100% {
    opacity: 0.12;
    transform: translate3d(-1.5%, 9%, 0) rotate(-1.6deg) scaleX(0.97) scaleY(0.93);
  }
  28% {
    opacity: 0.17;
    transform: translate3d(1.2%, 1%, 0) rotate(-0.4deg) scaleX(1.02) scaleY(1.01);
  }
  55% {
    opacity: 0.21;
    transform: translate3d(-0.8%, -7%, 0) rotate(1.7deg) scaleX(1.06) scaleY(1.1);
  }
  78% {
    opacity: 0.16;
    transform: translate3d(1.8%, -1%, 0) rotate(0.5deg) scaleX(1.01) scaleY(1.04);
  }
}

@keyframes shader-ripple {
  0%, 100% {
    opacity: 0.14;
    transform: translate3d(-16%, 13%, 0) rotate(-7deg) scaleX(0.86);
  }
  28% {
    opacity: 0.5;
    transform: translate3d(-4%, 0, 0) rotate(-3deg) scaleX(1.04);
  }
  58% {
    opacity: 0.72;
    transform: translate3d(10%, -7%, 0) rotate(4deg) scaleX(1.13);
  }
  80% {
    opacity: 0.34;
    transform: translate3d(18%, 4%, 0) rotate(7deg) scaleX(0.96);
  }
}

@keyframes shader-surface {
  0% {
    opacity: 0.43;
    transform: translate3d(-8%, 12%, 0) skewX(-7deg) scaleX(0.94) scaleY(0.9);
  }
  30% {
    opacity: 0.8;
    transform: translate3d(2%, -2%, 0) skewX(4deg) scaleX(1.06) scaleY(1.04);
  }
  57% {
    opacity: 0.94;
    transform: translate3d(7%, -8%, 0) skewX(-3deg) scaleX(1.14) scaleY(1.13);
  }
  78% {
    opacity: 0.66;
    transform: translate3d(-1%, 1%, 0) skewX(6deg) scaleX(1.03) scaleY(0.98);
  }
  100% {
    opacity: 0.43;
    transform: translate3d(-8%, 12%, 0) skewX(-7deg) scaleX(0.94) scaleY(0.9);
  }
}

@keyframes particle-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 20px, 0) scale(0.45);
  }
  9% {
    opacity: 0.76;
  }
  58% {
    opacity: 0.48;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), -108vh, 0) scale(1.18);
  }
}

@keyframes shader-impact-bloom {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0.2) scaleY(0.3);
  }
  18% {
    opacity: 0.58;
  }
  48% {
    opacity: 0.38;
    transform: translate(-50%, -50%) scaleX(1.22) scaleY(1.1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(1.62) scaleY(1.28);
  }
}

@keyframes shader-impact-wave {
  0% {
    opacity: 0;
    transform: translateX(50%) perspective(240px) rotateX(64deg) scale(0.3);
  }
  14% {
    opacity: 0.62;
  }
  100% {
    opacity: 0;
    transform: translateX(50%) perspective(240px) rotateX(64deg) scaleX(5.4) scaleY(3.1);
  }
}

@media (max-width: 820px) {
  .ambient-shader {
    right: -45vw;
    left: -45vw;
    bottom: -14vh;
    height: 62vh;
  }

  .particle-field {
    mask-image: linear-gradient(to top, #000 0%, #000 55%, transparent 92%);
  }

  main {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-shader,
  .ambient-shader::after,
  .ambient-shader::before,
  .ambient-particle {
    animation: none !important;
  }

  .ambient-particle,
  .shader-impact {
    display: none;
  }

  .wave-shader-canvas {
    opacity: 0.72;
  }

  .ambient-card-interactive {
    transition: none;
  }

  .ambient-card-interactive:hover {
    transform: none;
  }
}

/* Authentication experience */
.auth-gate {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 32px;
  background:
    radial-gradient(ellipse 65% 48% at 18% 100%, rgba(77, 23, 156, .32), transparent 70%),
    linear-gradient(145deg, rgba(5, 6, 12, .94), rgba(9, 10, 19, .88));
  opacity: 1;
  visibility: visible;
  transition: opacity .42s ease, visibility .42s ease;
}

.authenticated .auth-gate {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-pending .auth-gate {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

.auth-locked .shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-stage {
  display: grid;
  width: min(1120px, 100%);
  min-height: min(710px, calc(100vh - 64px));
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, .88fr);
  overflow: hidden;
  border: 1px solid rgba(112, 153, 255, .17);
  border-radius: 30px;
  background: rgba(10, 11, 20, .7);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .58), inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(28px);
}

.auth-story {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  padding: 54px 58px 46px;
  border-right: 1px solid rgba(112, 153, 255, .12);
  background:
    radial-gradient(circle at 16% 90%, rgba(113, 55, 217, .3), transparent 40%),
    radial-gradient(circle at 82% 12%, rgba(79, 227, 216, .07), transparent 28%),
    linear-gradient(150deg, rgba(22, 25, 45, .75), rgba(11, 12, 22, .56));
}

.auth-story::after {
  position: absolute;
  right: -90px;
  bottom: -160px;
  width: 460px;
  height: 300px;
  border: 1px solid rgba(154, 92, 255, .18);
  border-radius: 50%;
  box-shadow:
    0 0 80px rgba(116, 51, 223, .17),
    inset 0 0 70px rgba(116, 51, 223, .09);
  content: "";
  transform: rotate(-9deg);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand > b {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(112, 153, 255, .58);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(112, 153, 255, .26), rgba(112, 153, 255, .04));
  box-shadow: inset 0 0 20px rgba(112, 153, 255, .16), 0 0 24px rgba(112, 153, 255, .1);
  color: #d7e0ff;
  font: 600 24px var(--font-barlow);
}

.auth-brand > span {
  display: flex;
  flex-direction: column;
}

.auth-brand strong {
  color: #f1f3ff;
  font: 600 20px var(--font-barlow);
  letter-spacing: .24em;
  line-height: 1;
}

.auth-brand small {
  margin-top: 6px;
  color: #7f87ad;
  font: 600 9px var(--font-barlow);
  letter-spacing: .24em;
}

.auth-story-copy {
  max-width: 560px;
  margin: auto 0;
}

.auth-story-copy .eyebrow {
  color: #7099ff;
  font-size: 11px;
}

.auth-story-copy h1 {
  max-width: 520px;
  margin: 18px 0;
  color: #eef0fa;
  font: 500 clamp(44px, 4.2vw, 64px)/.98 var(--font-barlow);
  letter-spacing: -.015em;
}

.auth-story-copy > p:last-child {
  max-width: 500px;
  color: #9ba2c3;
  font-size: 16px;
  line-height: 1.7;
}

.auth-benefits {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-bottom: 34px;
}

.auth-benefits span {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #c3c8df;
  font-size: 13px;
  font-weight: 400;
}

.auth-benefits i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(112, 153, 255, .16);
  border-radius: 9px;
  background: rgba(112, 153, 255, .07);
  color: #83a6ff;
  font-style: normal;
}

.auth-benefits b {
  font-weight: 400;
}

.auth-story-foot {
  position: relative;
  z-index: 1;
  color: #666e94;
  font: 600 9px var(--font-barlow);
  letter-spacing: .22em;
}

.auth-panel {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 56px 58px;
  background: rgba(8, 9, 16, .76);
}

.auth-content,
.auth-loading {
  width: min(390px, 100%);
}

.auth-loading[hidden],
.auth-content[hidden],
.auth-form [hidden],
.auth-feedback[hidden] {
  display: none !important;
}

.auth-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.auth-loading > b {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(112, 153, 255, .2);
  border-radius: 14px;
  background: rgba(112, 153, 255, .07);
}

.auth-loading > b i {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(112, 153, 255, .22);
  border-top-color: #7099ff;
  border-radius: 50%;
  animation: cloud-spin .9s linear infinite;
}

.auth-loading > span {
  display: flex;
  flex-direction: column;
}

.auth-loading strong {
  color: #e3e7f7;
  font-size: 15px;
  font-weight: 500;
}

.auth-loading small {
  margin-top: 5px;
  color: #7f87a8;
  font-size: 12px;
}

.auth-panel-head .eyebrow {
  color: #7099ff;
  font-size: 10px;
}

.auth-panel-head h2 {
  margin: 13px 0 8px;
  color: #f0f2fb;
  font: 600 35px/1.05 var(--font-barlow);
}

.auth-panel-head > p:last-child {
  color: #8f96b5;
  font-size: 14px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 30px 0 24px;
  padding: 4px;
  border: 1px solid rgba(112, 153, 255, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .018);
}

.auth-tabs button {
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #777f9f;
  font-size: 13px;
  transition: .2s ease;
}

.auth-tabs button:hover {
  color: #cfd5ec;
}

.auth-tabs button.active {
  background: rgba(112, 153, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(112, 153, 255, .12);
  color: #dce5ff;
}

.auth-form {
  display: grid;
  gap: 17px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #7d85a6;
  font: 600 10px var(--font-barlow);
  letter-spacing: .16em;
}

.auth-form input {
  width: 100%;
  height: 49px;
  padding: 0 15px;
  border: 1px solid rgba(112, 153, 255, .14);
  border-radius: 11px;
  outline: 0;
  background: rgba(8, 9, 17, .72);
  color: #e6e9f5;
  font: 400 14px var(--font-outfit);
  letter-spacing: 0;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-form input::placeholder {
  color: #555d7c;
}

.auth-form input:focus {
  border-color: rgba(112, 153, 255, .48);
  background: rgba(12, 14, 25, .86);
  box-shadow: 0 0 0 3px rgba(112, 153, 255, .075);
}

.auth-secret {
  position: relative;
  display: block;
}

.auth-secret input {
  padding-right: 48px;
}

.auth-form input::-ms-reveal,
.auth-form input::-ms-clear {
  display: none;
}

.auth-secret button {
  position: absolute;
  top: 50%;
  right: 9px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #7f89ad;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .18s ease, color .18s ease;
}

.auth-secret button:hover,
.auth-secret button:focus-visible {
  outline: 0;
  background: rgba(112, 153, 255, .08);
  color: #a9bfff;
}

.auth-secret button svg {
  width: 20px;
  height: 20px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.auth-eye-slash {
  opacity: 0;
  transition: opacity .16s ease;
}

.auth-secret button.is-visible {
  color: #a9bfff;
}

.auth-secret button.is-visible .auth-eye-slash {
  opacity: 1;
}

.auth-submit {
  width: 100%;
  height: 50px;
  margin-top: 4px;
  border-radius: 11px;
  font-size: 12px;
}

.auth-submit.is-loading {
  opacity: .72;
  cursor: wait;
}

.auth-feedback {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(79, 227, 196, .16);
  border-radius: 10px;
  background: rgba(79, 227, 196, .055);
  color: #9edbcf;
  font-size: 12px;
  line-height: 1.5;
}

.auth-feedback.is-error {
  border-color: rgba(235, 151, 151, .18);
  background: rgba(235, 151, 151, .055);
  color: #e5a9ad;
}

.auth-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(112, 153, 255, .1);
}

.auth-trust > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4fe3c4;
  box-shadow: 0 0 10px rgba(79, 227, 196, .7);
}

.auth-trust > span {
  display: flex;
  flex-direction: column;
}

.auth-trust strong {
  color: #b8bed6;
  font-size: 11px;
  font-weight: 500;
}

.auth-trust small {
  margin-top: 3px;
  color: #656d8d;
  font-size: 10px;
}

@media (max-width: 820px) {
  .auth-gate {
    align-items: start;
    padding: 18px;
  }

  .auth-stage {
    min-height: calc(100vh - 36px);
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .auth-story {
    min-height: 250px;
    padding: 32px;
    border-right: 0;
    border-bottom: 1px solid rgba(112, 153, 255, .12);
  }

  .auth-story-copy {
    margin: 46px 0 20px;
  }

  .auth-story-copy h1 {
    max-width: 440px;
    font-size: 42px;
  }

  .auth-story-copy > p:last-child,
  .auth-benefits,
  .auth-story-foot {
    display: none;
  }

  .auth-panel {
    padding: 38px 26px 44px;
  }
}

@media (max-width: 480px) {
  .auth-gate {
    padding: 0;
  }

  .auth-stage {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .auth-story {
    min-height: 210px;
    padding: 26px 24px;
  }

  .auth-story-copy {
    margin: 34px 0 0;
  }

  .auth-story-copy h1 {
    margin-bottom: 0;
    font-size: 36px;
  }

  .auth-panel {
    padding: 34px 24px 42px;
  }
}

/* Personal profile and AI goals */
.profile-shortcut {
  overflow: hidden;
  border-color: rgba(232, 201, 160, .16);
  border-radius: 50%;
}

.profile-shortcut > i {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: inherit;
  background-position: center;
  background-size: cover;
  color: var(--gold);
  font: 600 11px var(--font-barlow);
  font-style: normal;
}

.profile-identity > i.has-avatar,
.profile-shortcut > i.has-avatar {
  border-color: rgba(112, 153, 255, .28);
  background-position: center;
  background-size: cover;
}

.profile-page {
  --profile-surface: linear-gradient(145deg, rgba(20, 22, 35, .72), rgba(10, 11, 19, .72));
}

.profile-page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.profile-save-state {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(63, 209, 184, .14);
  border-radius: 10px;
  background: rgba(63, 209, 184, .045);
  color: #9bcfc5;
  font-size: 10px;
  white-space: nowrap;
}

.profile-save-state::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(63, 209, 184, .65);
  content: "";
}

.profile-save-state.is-error {
  border-color: rgba(232, 201, 160, .18);
  background: rgba(232, 201, 160, .05);
  color: var(--gold);
}

.profile-save-state.is-error::before {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(232, 201, 160, .55);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, .62fr);
  align-items: start;
  gap: 20px;
}

.profile-form,
.profile-ai-impact,
.profile-password-card {
  border: 1px solid rgba(159, 171, 224, .1);
  border-radius: 18px;
  background: var(--profile-surface);
  box-shadow: 0 22px 62px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .025);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.profile-form {
  overflow: hidden;
}

.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 28px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background:
    radial-gradient(circle at 3% 50%, rgba(112, 153, 255, .1), transparent 25%),
    linear-gradient(90deg, rgba(112, 153, 255, .035), transparent 45%);
}

.profile-avatar {
  position: relative;
  display: grid;
  overflow: hidden;
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  place-items: center;
  border: 1px solid rgba(112, 153, 255, .35);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(112, 153, 255, .2), rgba(112, 153, 255, .04));
  box-shadow: inset 0 0 25px rgba(112, 153, 255, .1), 0 12px 34px rgba(0, 0, 0, .25);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar span {
  color: #dbe4ff;
  font: 600 29px var(--font-barlow);
  letter-spacing: .04em;
}

.profile-avatar-section > div:last-child {
  min-width: 0;
}

.profile-avatar-section h2 {
  overflow: hidden;
  margin: 6px 0 5px;
  color: #e6e9f5;
  font: 500 27px/1.1 var(--font-barlow);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-avatar-section > div:last-child > p:not(.eyebrow) {
  margin: 0;
  color: #77809d;
  font-size: 11px;
}

.profile-avatar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.profile-upload-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  cursor: pointer;
}

.text-button {
  padding: 6px;
  border: 0;
  background: transparent;
  color: #8e96b2;
  font-size: 10px;
}

.text-button:hover {
  color: #e2b1b5;
}

.profile-form-section {
  padding: 28px 30px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.profile-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.profile-section-heading > span {
  display: flex;
  align-items: center;
  gap: 11px;
}

.profile-section-heading > span small {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(112, 153, 255, .16);
  border-radius: 8px;
  background: rgba(112, 153, 255, .055);
  color: var(--blue);
  font: 500 9px var(--font-mono);
}

.profile-section-heading strong {
  color: #d9deed;
  font-size: 14px;
  font-weight: 500;
}

.profile-section-heading > p {
  max-width: 360px;
  margin: 2px 0 0;
  color: #717a96;
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}

.profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
}

.profile-form label,
.profile-password-card label,
.profile-focus-grid legend {
  color: #949db9;
  font: 600 10px var(--font-barlow);
  letter-spacing: .13em;
}

.profile-form label {
  min-width: 0;
}

.profile-form label.wide {
  grid-column: 1 / -1;
}

.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form select,
.profile-form textarea,
.profile-password-card input {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(159, 171, 224, .1);
  border-radius: 10px;
  outline: 0;
  background: rgba(4, 5, 11, .4);
  color: #e1e5f2;
  font: 400 13px var(--font-outfit);
  letter-spacing: 0;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form select,
.profile-password-card input {
  height: 44px;
  padding: 0 13px;
}

.profile-form textarea {
  min-height: 112px;
  padding: 13px;
  line-height: 1.65;
  resize: vertical;
}

.profile-goals-section textarea {
  min-height: 150px;
}

.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus,
.profile-password-card input:focus {
  border-color: rgba(112, 153, 255, .42);
  background: rgba(8, 10, 18, .62);
  box-shadow: 0 0 0 3px rgba(112, 153, 255, .06);
}

.profile-form label > small {
  display: block;
  margin-top: 7px;
  color: #666f8c;
  font: 400 9px var(--font-outfit);
  letter-spacing: 0;
  line-height: 1.5;
}

.profile-form output {
  color: #9aaeea;
}

.profile-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-focus-grid legend {
  margin-bottom: 10px;
}

.profile-focus-grid > label {
  display: flex;
  min-height: 74px;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(159, 171, 224, .08);
  border-radius: 11px;
  background: rgba(255, 255, 255, .015);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}

.profile-focus-grid > label:has(input:checked) {
  border-color: rgba(112, 153, 255, .23);
  background: rgba(112, 153, 255, .055);
}

.profile-focus-grid input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 1px 0 0;
  accent-color: #7099ff;
}

.profile-focus-grid span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.profile-focus-grid b {
  color: #ccd2e5;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.profile-focus-grid small {
  color: #737c98;
  font: 400 10px/1.45 var(--font-outfit);
  letter-spacing: 0;
}

.profile-preference-fields {
  margin-top: 19px;
}

.profile-form-actions {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 30px;
  background: rgba(4, 5, 10, .18);
}

.profile-form-actions > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #747d98;
  font-size: 10px;
}

.profile-form-actions > span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(63, 209, 184, .55);
}

.profile-aside {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 16px;
}

.profile-ai-impact,
.profile-password-card {
  padding: 26px;
}

.profile-ai-impact {
  overflow: hidden;
  background:
    radial-gradient(circle at 95% 0, rgba(164, 108, 255, .15), transparent 34%),
    var(--profile-surface);
}

.profile-ai-impact > b {
  display: grid;
  width: 45px;
  height: 45px;
  margin-bottom: 24px;
  place-items: center;
  border: 1px solid rgba(164, 108, 255, .22);
  border-radius: 13px;
  background: rgba(164, 108, 255, .07);
  color: var(--violet);
  font-size: 19px;
}

.profile-ai-impact h2,
.profile-password-card h2 {
  margin: 8px 0 12px;
  color: #e0e4f2;
  font: 500 27px/1.08 var(--font-barlow);
}

.profile-ai-impact > p:not(.eyebrow),
.profile-password-card > p:not(.eyebrow) {
  margin: 0;
  color: #838ca8;
  font-size: 11px;
  line-height: 1.65;
}

.profile-ai-impact ul {
  display: grid;
  gap: 0;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.profile-ai-impact li {
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 10px;
  padding: 15px 0;
  border-top: 1px solid rgba(255, 255, 255, .055);
}

.profile-ai-impact li > i {
  color: var(--blue);
  font: 500 9px var(--font-mono);
  font-style: normal;
}

.profile-ai-impact li span {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.profile-ai-impact li strong {
  color: #cbd1e3;
  font-size: 11px;
  font-weight: 500;
}

.profile-ai-impact li small {
  color: #707994;
  font-size: 9px;
  line-height: 1.5;
}

.profile-password-card label {
  display: block;
  margin-top: 18px;
}

.profile-password-card button {
  width: 100%;
  min-height: 42px;
  margin-top: 18px;
}

@media (max-width: 1080px) {
  .profile-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-aside {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .profile-page-title,
  .profile-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-save-state {
    white-space: normal;
  }

  .profile-section-heading {
    gap: 10px;
  }

  .profile-section-heading > p {
    max-width: none;
    text-align: left;
  }

  .profile-fields,
  .profile-focus-grid,
  .profile-aside {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .profile-avatar-section {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 20px;
  }

  .profile-avatar {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
    border-radius: 20px;
  }

  .profile-avatar-section h2 {
    white-space: normal;
  }

  .profile-form-section {
    padding: 24px 20px;
  }

  .profile-form-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 18px 20px 20px;
  }

  .profile-form-actions .primary {
    width: 100%;
  }

  .profile-avatar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-ai-impact,
  .profile-password-card {
    padding: 23px 20px;
  }
}

@media (hover: none) {
  .ambient-card-interactive:hover {
    transform: none;
  }

  .ambient-card-interactive::after {
    display: none;
  }
}

@media print {
  .ambient-shader,
  .particle-field,
  .wave-shader-canvas {
    display: none !important;
  }
}

/* Typography legibility pass: keep hierarchy, remove micro-text. */
.eyebrow,
.sidebar nav > label {
  font-size: 11px;
  letter-spacing: 0.18em;
}

.brand small {
  font-size: 9px;
}

.sidebar nav button {
  font-size: 14px;
}

.sidebar nav button em {
  font-size: 9px;
}

.local strong,
.profile strong {
  font-size: 11px;
}

.local small,
.profile small {
  font-size: 10px;
  line-height: 1.35;
}

main > header > span {
  font-size: 10px;
}

.search {
  font-size: 12px;
}

.welcome > div:first-child > span,
.title > span,
.title > small {
  font-size: 14px;
  line-height: 1.55;
}

.score > small,
.capture-head small,
.insight small {
  font-size: 10px;
}

.score i,
.capture-foot > small {
  font-size: 10px;
}

.capture textarea,
.register input,
.register textarea {
  font-size: 13px;
}

.preview > p {
  font-size: 14px;
}

.preview-metrics small,
.summary small,
.metrics small {
  font-size: 10px;
  letter-spacing: 0.13em;
  line-height: 1.35;
}

.metrics em {
  font-size: 10px;
  line-height: 1.4;
}

.chips span {
  padding: 5px 9px;
  font-size: 10px;
}

.panel-head > small {
  font-size: 9px;
}

.bar > i span,
.bar > small {
  font-size: 9px;
}

.donut small {
  font-size: 9px;
}

.focus p,
.focus p strong {
  font-size: 11px;
}

.insight h2 {
  font-size: 18px;
}

.insight p {
  font-size: 11px;
  line-height: 1.5;
}

.insight button,
.recent .section-head > button {
  font-size: 10px;
}

.entry-date span {
  font-size: 10px;
}

.entry-body h3 {
  font-size: 14px;
  line-height: 1.4;
}

.entry-body p {
  font-size: 11px;
}

.entry-body > small {
  font-size: 10px;
}

.register label {
  font-size: 12px;
}

.register > aside span,
.privacy > p:not(.eyebrow),
.privacy li,
.preview li,
.tip > span,
.big > p:not(.eyebrow) {
  font-size: 12px;
}

.big > small {
  font-size: 10px;
}

@media (max-width: 560px) {
  .eyebrow,
  .sidebar nav > label {
    font-size: 10px;
  }

  .metrics small,
  .metrics em {
    font-size: 9px;
  }

  .mobile button {
    font-size: 9px;
  }
}

/* Project portfolio experience and full project page */
.projects-head-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.projects-head-actions .primary {
  align-self: center;
}

.project-form[hidden] {
  display: none !important;
}

.projects-layout {
  grid-template-columns: 1fr;
}

.project-form {
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
  margin-bottom: 28px;
}

.project-form:not([hidden]) {
  display: grid;
  animation: project-form-in .22s ease-out;
}

.project-form-head,
.project-form > .wide {
  grid-column: 1 / -1;
}

.project-form > .wide {
  width: auto;
  min-width: 190px;
  justify-self: end;
}

@keyframes project-form-in {
  from {
    opacity: 0;
    transform: translateY(-7px);
  }
}

.project-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.project-filters {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .065);
  border-radius: 10px;
  background: rgba(5, 6, 11, .28);
}

.project-filters button {
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  transition: color .18s, background .18s;
}

.project-filters button:hover {
  color: var(--text);
}

.project-filters button.active {
  background: rgba(112, 153, 255, .1);
  color: var(--blue);
}

.projects-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-page {
  max-width: 1240px;
  padding-top: 34px;
}

.project-page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.project-page-nav > button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}

.project-page-nav > button:hover {
  color: var(--text);
}

.project-page-nav > div {
  display: flex;
  gap: 8px;
}

.project-page-hero {
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 17px 17px 0 0;
  background-color: rgba(16, 18, 28, .7);
}

.project-page .project-detail-metrics {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, .075);
  border-top: 0;
  border-radius: 0 0 17px 17px;
  background: rgba(12, 13, 21, .52);
}

.project-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, .62fr);
  gap: 16px;
  align-items: start;
  margin-top: 22px;
}

.project-page-grid > div {
  min-width: 0;
}

.project-page-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project-page-section-head h3,
.project-page-aside h3 {
  margin: 4px 0 0;
  font: 500 23px var(--font-barlow);
}

.project-page-aside {
  position: sticky;
  top: 92px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(18, 20, 31, .72), rgba(10, 11, 18, .75));
  backdrop-filter: blur(16px);
}

.project-page-aside > span {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.project-page-aside > span small {
  display: block;
  color: var(--muted);
  font: 600 8px var(--font-barlow);
  letter-spacing: .12em;
}

.project-page-aside > span strong {
  display: block;
  margin-top: 4px;
  color: #dce0ef;
  font-size: 11px;
  font-weight: 500;
}

.project-page-aside > p:last-child {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.project-documentation-empty {
  padding: 48px 34px;
  border: 1px dashed rgba(112, 153, 255, .22);
  border-radius: 15px;
  background: radial-gradient(circle at 10% 15%, rgba(112, 153, 255, .08), transparent 30%), rgba(12, 13, 21, .4);
  text-align: center;
}

.project-documentation-empty > b {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  place-items: center;
  border: 1px solid rgba(196, 127, 255, .28);
  border-radius: 12px;
  background: rgba(196, 127, 255, .07);
  color: var(--violet);
  font-size: 18px;
}

.project-documentation-empty h3 {
  margin: 8px 0;
  font: 500 27px var(--font-barlow);
}

.project-documentation-empty > p:not(.eyebrow) {
  max-width: 560px;
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.project-document {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 15px;
  background: linear-gradient(155deg, rgba(18, 20, 31, .78), rgba(10, 11, 18, .82));
  box-shadow: 0 20px 55px rgba(0, 0, 0, .15);
}

.project-document-cover {
  position: relative;
  overflow: hidden;
  padding: 38px 36px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
  background: radial-gradient(circle at 0 0, color-mix(in srgb, var(--project-color) 16%, transparent), transparent 42%);
}

.project-document-cover::after {
  position: absolute;
  right: -80px;
  bottom: -100px;
  width: 300px;
  height: 190px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--project-color) 12%, transparent);
  filter: blur(52px);
  content: "";
}

.doc-brand {
  color: var(--blue);
  font: 600 8px var(--font-barlow);
  letter-spacing: .19em;
}

.project-document-cover h2 {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 15px 0 10px;
  font: 500 clamp(30px, 4vw, 43px)/1.05 var(--font-barlow);
}

.project-document-cover p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  color: #b9c0d7;
  font-size: 11px;
  line-height: 1.7;
}

.project-document-cover small {
  position: relative;
  z-index: 1;
  color: #686f8d;
  font-size: 8px;
}

.project-doc-section {
  padding: 27px 36px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.project-doc-section h4 {
  margin: 5px 0 12px;
  font: 500 21px var(--font-barlow);
}

.project-doc-section > p:not(.eyebrow) {
  margin: 0;
  color: #aeb5cd;
  font-size: 10px;
  line-height: 1.75;
}

.project-doc-item {
  padding: 13px 0;
}

.project-doc-item + .project-doc-item {
  border-top: 1px solid rgba(255, 255, 255, .045);
}

.project-doc-item time {
  color: var(--blue);
  font: 600 8px var(--font-barlow);
  letter-spacing: .08em;
}

.project-doc-item h5 {
  margin: 5px 0 4px;
  color: #dce0ef;
  font-size: 11px;
  font-weight: 500;
}

.project-doc-item p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.project-doc-next {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
}

.project-doc-next b {
  color: var(--blue);
  font: 500 10px var(--font-mono);
}

.project-doc-next span {
  color: #b9bfd4;
  font-size: 10px;
}

.project-doc-conclusion {
  padding: 29px 36px 34px;
  background: rgba(112, 153, 255, .035);
}

.project-doc-conclusion > p:last-child {
  margin: 8px 0 0;
  color: #c3c9dc;
  font-size: 10px;
  line-height: 1.75;
}

.project-page > .project-evolution,
.project-page > .project-timeline {
  margin-top: 18px;
  padding: 25px 28px;
  border: 1px solid rgba(255, 255, 255, .065);
  border-radius: 14px;
  background: rgba(12, 13, 21, .45);
}

@media (max-width: 1120px) {
  .projects-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .project-page-grid {
    grid-template-columns: 1fr;
  }

  .project-page-aside {
    position: static;
  }
}

@media (max-width: 650px) {
  .projects-head-actions,
  .project-page-nav,
  .project-page-nav > div,
  .project-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .project-form {
    grid-template-columns: 1fr;
  }

  .project-form-head,
  .project-form > .wide {
    grid-column: 1;
  }

  .project-form > .wide {
    width: 100%;
  }

  .projects-list {
    grid-template-columns: 1fr;
  }

  .project-filters {
    align-self: flex-start;
  }

  .project-document-cover,
  .project-doc-section,
  .project-doc-conclusion {
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 11mm;
  }

  html,
  body.printing-project {
    background: #090a10 !important;
    color: #edf0fa !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .printing-project .ambient-shader,
  .printing-project .particle-field,
  .printing-project .sidebar,
  .printing-project main > header,
  .printing-project .mobile,
  .printing-project .project-page-nav,
  .printing-project .project-page-aside,
  .printing-project .project-evolution,
  .printing-project .project-timeline,
  .printing-project .toast,
  .printing-project #projeto-detalhe .project-page-section-head {
    display: none !important;
  }

  .printing-project main {
    margin: 0 !important;
  }

  .printing-project main > .view {
    display: none !important;
  }

  .printing-project #projeto-detalhe {
    display: block !important;
  }

  .printing-project .project-page {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .printing-project .project-page-hero {
    border-radius: 14px 14px 0 0;
  }

  .printing-project .project-page-grid {
    display: block;
    margin-top: 16px;
  }

  .printing-project .project-document,
  .printing-project .project-detail-head,
  .printing-project .project-detail-metrics {
    break-inside: avoid;
    border-color: #252a3b !important;
    background-color: #11131d !important;
    box-shadow: none !important;
  }

  .printing-project .project-doc-section,
  .printing-project .project-doc-conclusion,
  .printing-project .project-doc-item {
    break-inside: avoid;
  }
}

/* Projects and project context */
.capture-meta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 12px;
  margin-top: 12px;
}

.capture-project {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 600 9px var(--font-barlow);
  letter-spacing: .14em;
}

.capture-project > span,
.optional-label {
  color: #5e6584;
  font-size: 8px;
}

.capture-project select {
  width: min(280px, 100%);
  height: 36px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  outline: none;
  background: rgba(4, 5, 10, .42);
  color: var(--secondary);
  font: 400 11px var(--font-outfit);
  letter-spacing: 0;
}

.capture-duration {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font: 600 9px var(--font-barlow);
  letter-spacing: .12em;
}

.capture-duration > span:first-of-type {
  color: #5e6584;
  font-size: 8px;
}

.capture-duration > span:last-child,
.duration-field {
  position: relative;
  display: block;
}

.capture-duration input {
  width: 82px;
  height: 36px;
  margin-left: auto;
  padding: 0 38px 0 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  outline: none;
  background: rgba(4, 5, 10, .42);
  color: var(--secondary);
  font: 400 11px var(--font-outfit);
}

.capture-duration em,
.duration-field em {
  position: absolute;
  top: 50%;
  right: 10px;
  color: var(--muted);
  font: 400 8px var(--font-outfit);
  font-style: normal;
  letter-spacing: 0;
  pointer-events: none;
  transform: translateY(-50%);
}

.duration-field input {
  padding-right: 52px;
}

.project-native-select {
  display: none !important;
}

.project-picker {
  position: relative;
  min-width: 0;
}

.capture-project .project-picker {
  width: min(300px, 100%);
  margin-left: auto;
}

.register .project-picker {
  width: 100%;
  margin-top: 9px;
  height: 48px;
}

.project-picker-trigger {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid rgba(112, 153, 255, .18);
  border-radius: 12px;
  outline: none;
  background: linear-gradient(145deg, rgba(12, 14, 25, .82), rgba(7, 8, 15, .88));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
  color: #d8dced;
  font: 400 11px var(--font-outfit);
  text-align: left;
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.capture-project .project-picker-trigger {
  height: 38px;
  min-height: 38px;
  max-height: 38px;
}

.register .project-picker-trigger {
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  padding: 0 14px !important;
  overflow: hidden;
}

.project-picker-trigger:hover {
  border-color: rgba(112, 153, 255, .34);
  background: linear-gradient(145deg, rgba(17, 20, 35, .9), rgba(9, 10, 18, .92));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14), inset 0 1px rgba(255, 255, 255, .035);
}

.project-picker.is-open .project-picker-trigger,
.project-picker-trigger:focus-visible {
  border-color: rgba(112, 153, 255, .52);
  box-shadow: 0 0 0 3px rgba(112, 153, 255, .08);
}

.project-picker-value {
  display: flex;
  height: 100%;
  min-width: 0;
  flex: 1;
  flex-direction: row !important;
  align-items: center;
  gap: 9px;
}

.project-picker-value > span:last-child,
.project-picker-empty-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-picker-trigger > i {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  transition: transform .2s, color .2s;
}

.project-picker.is-open .project-picker-trigger > i {
  color: var(--blue);
  transform: rotate(180deg);
}

.project-picker-menu {
  position: fixed;
  z-index: 160;
  max-height: 320px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(112, 153, 255, .19);
  border-radius: 13px;
  background: rgba(10, 11, 20, .97);
  box-shadow: 0 24px 65px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(22px) saturate(1.15);
}

.project-picker-title {
  padding: 7px 10px 8px;
  color: #737b9b;
  font: 600 8px var(--font-barlow);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.project-picker-option {
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  outline: none;
  background: transparent;
  color: #c8ccdc;
  font: 400 11px var(--font-outfit);
  text-align: left;
  transition: background .16s, border-color .16s, color .16s, transform .16s;
}

.project-picker-empty-state {
  padding: 16px 10px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.project-picker-clear {
  width: 100%;
  margin-top: 5px;
  padding: 9px 10px 4px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .055);
  background: transparent;
  color: #6d7491;
  font-size: 8px;
  text-align: left;
  transition: color .16s;
}

.project-picker-clear:hover {
  color: #adb4ce;
}

.project-picker-option:hover,
.project-picker-option:focus-visible {
  border-color: rgba(112, 153, 255, .12);
  background: linear-gradient(90deg, rgba(112, 153, 255, .11), rgba(112, 153, 255, .025));
  color: #f0f2fb;
  transform: translateX(2px);
}

.project-picker-option.is-selected {
  border-color: rgba(112, 153, 255, .15);
  background: rgba(112, 153, 255, .075);
  color: #e5e9f7;
}

.project-picker-option > span:not(.project-picker-icon) {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-picker-option > small {
  color: var(--muted);
  font: 600 7px var(--font-barlow);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.project-picker-icon {
  display: grid;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  flex: 0 0 28px !important;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}

.project-picker-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-picker-icon.initial {
  border-color: color-mix(in srgb, var(--project-color) 24%, transparent);
  background: color-mix(in srgb, var(--project-color) 8%, transparent);
  color: var(--project-color);
  font: 600 12px var(--font-barlow);
}

.register select {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 9px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: rgba(4, 5, 10, .46);
  color: var(--text);
  color-scheme: dark;
  font: 12px var(--font-outfit);
}

.capture-project select:focus,
.capture-duration input:focus,
.register select:focus {
  border-color: rgba(112, 153, 255, .44);
  box-shadow: 0 0 0 3px rgba(112, 153, 255, .07);
}

.projects-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.project-summary {
  min-width: 150px;
  padding: 15px 18px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  background: rgba(17, 19, 29, .52);
  text-align: right;
  backdrop-filter: blur(16px);
}

.project-summary small {
  display: block;
  color: var(--muted);
  font: 600 8px var(--font-barlow);
  letter-spacing: .16em;
}

.project-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--green);
  font: 500 28px var(--font-barlow);
}

.projects-layout {
  display: grid;
  grid-template-columns: minmax(270px, .72fr) minmax(0, 1.55fr);
  gap: 18px;
  align-items: start;
}

.project-form {
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(20, 22, 34, .7), rgba(12, 13, 21, .76));
  box-shadow: 0 22px 60px rgba(0, 0, 0, .18);
  backdrop-filter: blur(18px);
}

.project-form-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 24px;
}

.project-form-head > b {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  place-items: center;
  border: 1px solid rgba(112, 153, 255, .28);
  border-radius: 11px;
  background: rgba(112, 153, 255, .07);
  color: var(--blue);
}

.project-form-head h2,
.projects-content h2 {
  margin: 4px 0 0;
  font: 500 21px var(--font-barlow);
}

.project-form label {
  display: block;
  margin-bottom: 17px;
  color: var(--muted);
  font: 600 9px var(--font-barlow);
  letter-spacing: .13em;
}

.project-form input,
.project-form textarea,
.project-form select {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
  outline: none;
  background: rgba(3, 4, 9, .4);
  color: var(--text);
  font: 400 12px var(--font-outfit);
}

.project-form input,
.project-form select {
  height: 44px;
  padding: 0 12px;
}

.project-form textarea {
  min-height: 86px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

.project-form input:focus,
.project-form textarea:focus,
.project-form select:focus {
  border-color: rgba(112, 153, 255, .4);
  box-shadow: 0 0 0 3px rgba(112, 153, 255, .06);
}

.project-form input[type="color"] {
  padding: 5px;
}

.project-logo-upload {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 11px;
  border: 1px dashed rgba(112, 153, 255, .2);
  border-radius: 10px;
  background: rgba(112, 153, 255, .025);
  cursor: pointer;
}

.project-logo-upload:hover {
  border-color: rgba(112, 153, 255, .38);
  background: rgba(112, 153, 255, .045);
}

.project-logo-upload > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.project-logo-upload strong {
  color: #cfd5e8;
  font: 500 11px var(--font-outfit);
  letter-spacing: 0;
}

.project-logo-upload small {
  color: var(--muted);
  font: 400 8px var(--font-outfit);
  letter-spacing: 0;
}

.project-logo-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.project-logo-preview,
.project-logo,
.project-detail-logo {
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .035);
}

.project-logo-preview {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 11px;
  color: var(--blue);
  font-size: 18px;
}

.project-logo-preview img,
.project-logo img,
.project-detail-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-logo-preview.is-loading {
  animation: logo-pulse .8s ease-in-out infinite alternate;
}

@keyframes logo-pulse {
  to {
    opacity: .45;
  }
}

.project-form-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
}

.projects-content {
  min-width: 0;
}

.projects-content > .section-head {
  margin-bottom: 16px;
}

.projects-content > .section-head > small {
  color: var(--muted);
  font-size: 10px;
}

.projects-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 21px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(20, 22, 34, .63), rgba(12, 13, 21, .72));
  box-shadow: 0 16px 42px rgba(0, 0, 0, .14);
  backdrop-filter: blur(16px);
  cursor: pointer;
}

.project-card::after {
  position: absolute;
  right: -30px;
  bottom: -55px;
  width: 150px;
  height: 110px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--project-color) 18%, transparent);
  filter: blur(35px);
  content: "";
  pointer-events: none;
}

.project-card-top,
.project-card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.project-logo-fallback {
  background: color-mix(in srgb, var(--project-color) 12%, rgba(10, 11, 18, .8));
  color: var(--project-color);
  font: 600 16px var(--font-barlow);
}

.project-status {
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 999px;
  color: var(--muted);
  font: 600 8px var(--font-barlow);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.project-status.active {
  border-color: rgba(63, 209, 184, .2);
  color: var(--green);
}

.project-status.planning {
  border-color: rgba(112, 153, 255, .2);
  color: var(--blue);
}

.project-status.completed {
  color: var(--gold);
}

.project-card h3 {
  position: relative;
  z-index: 1;
  margin: 22px 0 8px;
  font: 500 20px var(--font-barlow);
}

.project-card > p {
  position: relative;
  z-index: 1;
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.project-card-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 22px;
  margin-top: 15px;
}

.project-card-stats span {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.project-card-stats strong {
  color: #dfe3f1;
  font: 500 18px var(--font-barlow);
}

.project-card-stats small {
  color: var(--muted);
  font: 600 7px var(--font-barlow);
  letter-spacing: .11em;
}

.project-card-foot {
  align-items: flex-end;
  gap: 12px;
  margin-top: 19px;
}

.project-card-foot > small {
  color: #626985;
  font-size: 8px;
}

.project-card-foot label {
  color: var(--muted);
  font: 600 8px var(--font-barlow);
  letter-spacing: .1em;
}

.project-card-foot select {
  display: block;
  height: 30px;
  margin-top: 4px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 7px;
  background: rgba(5, 6, 11, .6);
  color: var(--secondary);
  font-size: 9px;
}

.projects-empty {
  grid-column: 1 / -1;
  padding: 65px 30px;
  border: 1px dashed rgba(112, 153, 255, .22);
  border-radius: 14px;
  text-align: center;
}

.projects-empty b {
  color: var(--blue);
  font-size: 28px;
}

.projects-empty h3 {
  margin: 14px 0 6px;
  font: 500 23px var(--font-barlow);
}

.projects-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.entry-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--project-color) 26%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--project-color) 7%, transparent);
  color: #cbd0e2;
  font-size: 8px;
}

.project-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--project-color);
}

.project-modal-open {
  overflow: hidden;
}

.project-modal[hidden] {
  display: none;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 4, 9, .68);
  backdrop-filter: blur(9px);
}

.project-detail {
  position: relative;
  width: min(920px, 100%);
  max-height: min(860px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(20, 22, 34, .97), rgba(9, 10, 16, .98));
  box-shadow: 0 34px 100px rgba(0, 0, 0, .52);
  animation: project-detail-in .24s ease-out;
}

@keyframes project-detail-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.985);
  }
}

.project-detail-close {
  position: sticky;
  top: 15px;
  z-index: 4;
  display: grid;
  width: 34px;
  height: 34px;
  margin: 15px 15px -49px auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 9px;
  background: rgba(7, 8, 13, .72);
  color: var(--muted);
  font-size: 19px;
  backdrop-filter: blur(12px);
}

.project-detail-close:hover {
  color: #fff;
}

.project-detail-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  padding: 38px 40px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--project-color) 16%, transparent), transparent 38%);
}

.project-detail-head::after {
  position: absolute;
  right: -70px;
  bottom: -100px;
  width: 300px;
  height: 190px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--project-color) 13%, transparent);
  filter: blur(55px);
  content: "";
}

.project-detail-logo {
  position: relative;
  z-index: 1;
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  border-radius: 18px;
  color: var(--project-color);
  font: 600 30px var(--font-barlow);
}

.project-detail-head > div {
  position: relative;
  z-index: 1;
}

.project-detail-head h2 {
  margin: 8px 0 5px;
  font: 500 clamp(30px, 5vw, 44px)/1 var(--font-barlow);
}

.project-detail-head p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.project-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.project-detail-metrics > span {
  padding: 22px 12px;
}

.project-detail-metrics small {
  display: block;
  color: var(--muted);
  font: 600 8px var(--font-barlow);
  letter-spacing: .12em;
}

.project-detail-metrics strong {
  display: block;
  margin-top: 5px;
  color: #e2e5f2;
  font: 500 25px var(--font-barlow);
}

.project-evolution,
.project-timeline {
  padding: 27px 40px 5px;
}

.project-evolution h3,
.project-timeline h3 {
  margin: 4px 0 0;
  font: 500 21px var(--font-barlow);
}

.project-evolution .section-head > small,
.project-timeline .section-head > small {
  color: var(--muted);
  font-size: 9px;
}

.project-evolution-bars {
  display: flex;
  height: 145px;
  align-items: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 16px 24px;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 12px;
  background: rgba(0, 0, 0, .13);
}

.project-evolution-bars > div {
  display: flex;
  height: 100%;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
}

.project-evolution-bars i {
  position: relative;
  display: block;
  min-height: 5px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(to top, #4966be, #799cff);
  box-shadow: 0 0 16px rgba(112, 153, 255, .1);
}

.project-evolution-bars i span {
  position: absolute;
  top: -16px;
  left: 50%;
  color: var(--secondary);
  font-size: 7px;
  font-style: normal;
  transform: translateX(-50%);
}

.project-evolution-bars small {
  margin-bottom: -17px;
  color: var(--muted);
  font-size: 7px;
}

.project-timeline {
  padding-bottom: 40px;
}

.project-timeline-list {
  margin-top: 20px;
}

.project-timeline-item {
  display: grid;
  grid-template-columns: 24px 1fr;
}

.timeline-marker {
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-marker::after {
  position: absolute;
  top: 13px;
  bottom: -13px;
  width: 1px;
  background: rgba(112, 153, 255, .14);
  content: "";
}

.project-timeline-item:last-child .timeline-marker::after {
  display: none;
}

.timeline-marker i {
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  margin-top: 9px;
  border: 2px solid #11141f;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(112, 153, 255, .12);
}

.timeline-entry {
  margin-bottom: 12px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 11px;
  background: rgba(255, 255, 255, .018);
}

.timeline-entry > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timeline-entry time {
  color: var(--blue);
  font: 600 9px var(--font-barlow);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.timeline-entry > div span {
  color: var(--muted);
  font-size: 8px;
}

.timeline-entry h4 {
  margin: 9px 0 5px;
  color: #dfe3f1;
  font-size: 12px;
  font-weight: 500;
}

.timeline-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.timeline-entry ul {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-entry li {
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 999px;
  color: var(--secondary);
  font-size: 8px;
}

.project-detail-empty {
  margin-top: 18px;
  padding: 34px 20px;
  border: 1px dashed rgba(112, 153, 255, .18);
  border-radius: 12px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

@media (max-width: 900px) {
  .projects-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .mobile {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 620px) {
  .projects-head {
    align-items: stretch;
    flex-direction: column;
  }

  .project-summary {
    text-align: left;
  }

  .projects-list {
    grid-template-columns: 1fr;
  }

  .capture-meta {
    grid-template-columns: 1fr;
  }

  .capture-project select {
    width: 100%;
    margin-left: 0;
  }

  .capture-duration {
    justify-content: space-between;
  }

  .project-modal {
    padding: 8px;
  }

  .project-detail {
    max-height: calc(100vh - 16px);
    border-radius: 14px;
  }

  .project-detail-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 30px 22px 24px;
  }

  .project-detail-logo {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
  }

  .project-detail-metrics {
    grid-template-columns: 1fr 1fr;
    margin: 0 15px;
  }

  .project-evolution,
  .project-timeline {
    padding-right: 22px;
    padding-left: 22px;
  }
}

/* Consolidated AI insights */
#insights > .page.inner {
  width: min(100%, 1280px);
  max-width: 1280px;
  padding-top: 48px;
}

#insights .insights-page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

#insights .insights-page-title h1 {
  margin-bottom: 8px;
}

#insights .insights-page-title > span > small {
  color: #969fbd;
  font-size: 14px;
}

.insights-update-meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 4px;
}

.insights-update-meta small {
  color: #6f7895;
  font-size: 10px;
}

.insights-update-meta strong {
  color: #bdc4d9;
  font-size: 11px;
  font-weight: 500;
}

.insights-controls {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 245px auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .065);
  border-radius: 14px;
  background: rgba(12, 13, 21, .48);
  backdrop-filter: blur(16px);
}

.insights-period > small,
.insights-project-filter {
  display: block;
  margin-bottom: 8px;
  color: #727b98;
  font: 600 9px var(--font-barlow);
  letter-spacing: .13em;
}

.insights-period > div {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px;
  background: rgba(3, 4, 9, .28);
}

.insights-period button {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #7f88a5;
  font-size: 11px;
  transition: color .18s, background .18s;
}

.insights-period button:hover {
  color: #dce1f0;
}

.insights-period button.active {
  background: rgba(112, 153, 255, .11);
  color: #aebfff;
}

.insights-project-filter {
  margin: 0;
}

.insights-project-filter .project-picker {
  width: 100%;
  margin-top: 8px;
  letter-spacing: 0;
}

.insights-project-filter .project-picker-trigger {
  height: 44px;
}

.insights-controls > .primary {
  height: 44px;
  min-width: 174px;
}

.ai-insights-dashboard {
  display: grid;
  gap: 16px;
}

.ai-insights-loading,
.ai-insights-error {
  display: flex;
  min-height: 118px;
  align-items: center;
  gap: 16px;
  padding: 25px 28px;
  border: 1px solid rgba(112, 153, 255, .11);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(19, 21, 34, .68), rgba(10, 11, 18, .7));
}

.ai-insights-loading > b,
.ai-insights-error > b {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid rgba(196, 127, 255, .2);
  border-radius: 12px;
  background: rgba(196, 127, 255, .06);
  color: var(--violet);
}

.ai-insights-loading > span,
.ai-insights-error > span {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 5px;
}

.ai-insights-loading strong,
.ai-insights-error strong {
  font-size: 14px;
  font-weight: 500;
}

.ai-insights-loading small,
.ai-insights-error small {
  color: #7c85a1;
  font-size: 11px;
}

.ai-insights-loading > i {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(112, 153, 255, .16);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: ai-button-spin .8s linear infinite;
}

.ai-insights-error {
  border-color: rgba(232, 134, 160, .16);
}

.ai-insights-error > b {
  border-color: rgba(232, 134, 160, .2);
  background: rgba(232, 134, 160, .05);
  color: #e886a0;
}

.ai-insights-empty {
  padding: 70px 30px;
  border: 1px dashed rgba(112, 153, 255, .2);
  border-radius: 16px;
  background: rgba(12, 13, 21, .32);
  text-align: center;
}

.ai-insights-empty > b {
  color: var(--blue);
  font-size: 29px;
}

.ai-insights-empty h2 {
  margin: 13px 0 7px;
  font: 500 29px var(--font-barlow);
}

.ai-insights-empty > p:not(.eyebrow) {
  max-width: 560px;
  margin: 0 auto 22px;
  color: #838da8;
  font-size: 12px;
}

.ai-insight-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .58fr);
  overflow: hidden;
  border: 1px solid rgba(112, 153, 255, .13);
  border-radius: 18px 18px 0 0;
  background:
    radial-gradient(circle at 7% 10%, rgba(112, 153, 255, .12), transparent 32%),
    linear-gradient(145deg, rgba(20, 23, 39, .78), rgba(10, 11, 18, .76));
}

.ai-insight-hero-copy {
  padding: 38px 40px;
}

.ai-insight-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #8697c7;
  font: 600 9px var(--font-barlow);
  letter-spacing: .17em;
}

.ai-insight-kicker i {
  color: var(--violet);
  font-size: 15px;
  font-style: normal;
}

.ai-insight-hero h2 {
  max-width: 790px;
  margin: 17px 0 11px;
  font: 500 clamp(34px, 4vw, 49px)/1.05 var(--font-barlow);
}

.ai-insight-hero-copy > p {
  max-width: 800px;
  margin: 0;
  color: #a2abc6;
  font-size: 13px;
  line-height: 1.7;
}

.ai-confidence {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  border-left: 1px solid rgba(255, 255, 255, .06);
  background: rgba(5, 6, 11, .16);
}

.ai-confidence > span {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.ai-confidence > span small {
  max-width: 110px;
  color: #747e9b;
  font: 600 8px/1.4 var(--font-barlow);
  letter-spacing: .14em;
}

.ai-confidence > span strong {
  font: 500 31px var(--font-barlow);
}

.ai-confidence > i {
  display: block;
  height: 5px;
  margin: 14px 0;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, .06);
}

.ai-confidence > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--violet));
}

.ai-confidence > p {
  margin: 0;
  color: #818ba7;
  font-size: 10px;
  line-height: 1.55;
}

.ai-confidence > em {
  align-self: flex-start;
  margin-top: 15px;
  padding: 4px 8px;
  border: 1px solid rgba(112, 153, 255, .14);
  border-radius: 999px;
  color: #9cadde;
  font: 600 8px var(--font-barlow);
  font-style: normal;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ai-insight-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: -16px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, .065);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: rgba(10, 11, 18, .58);
}

.ai-insight-metrics > span {
  padding: 20px;
}

.ai-insight-metrics > span + span {
  border-left: 1px solid rgba(255, 255, 255, .055);
}

.ai-insight-metrics small {
  display: block;
  color: #717b97;
  font: 600 8px var(--font-barlow);
  letter-spacing: .14em;
}

.ai-insight-metrics strong {
  display: block;
  margin-top: 6px;
  color: #e1e5f2;
  font: 500 27px var(--font-barlow);
}

.ai-strongest-pattern {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, .7fr);
  gap: 34px;
  padding: 30px 34px;
  border: 1px solid rgba(255, 255, 255, .065);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(17, 19, 30, .62), rgba(10, 11, 18, .6));
}

.ai-strongest-pattern h3 {
  margin: 7px 0 9px;
  font: 500 27px var(--font-barlow);
}

.ai-strongest-pattern > div > p:last-child {
  margin: 0;
  color: #929bb7;
  font-size: 12px;
  line-height: 1.65;
}

.ai-strongest-pattern ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-strongest-pattern li {
  position: relative;
  padding: 10px 12px 10px 31px;
  border: 1px solid rgba(112, 153, 255, .07);
  border-radius: 9px;
  background: rgba(112, 153, 255, .025);
  color: #a8b0c8;
  font-size: 10px;
  line-height: 1.5;
}

.ai-strongest-pattern li::before {
  position: absolute;
  top: 13px;
  left: 12px;
  color: var(--blue);
  content: "✓";
}

.ai-recommendations-section,
.ai-evidence-panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .065);
  border-radius: 16px;
  background: rgba(12, 13, 21, .46);
}

.ai-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.ai-section-heading h3 {
  margin: 5px 0 0;
  font: 500 24px var(--font-barlow);
}

.ai-section-heading > small {
  color: #717b97;
  font-size: 10px;
}

.ai-action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}

.ai-action-card {
  display: grid;
  grid-template-columns: 29px 1fr;
  gap: 11px;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 12px;
  background: rgba(255, 255, 255, .016);
}

.ai-action-card > span {
  color: var(--blue);
  font: 500 9px var(--font-mono);
}

.ai-action-card h4 {
  margin: 0 0 6px;
  color: #d8ddea;
  font-size: 13px;
  font-weight: 500;
}

.ai-action-card p {
  margin: 0;
  color: #919ab5;
  font-size: 11px;
  line-height: 1.6;
}

.ai-action-card small {
  display: block;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .045);
  color: #747e9a;
  font-size: 9px;
  line-height: 1.5;
}

.ai-action-card.risk > span {
  color: #e886a0;
}

.ai-action-card.opportunity > span {
  color: var(--green);
}

.ai-insight-lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ai-trend-card {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 18px;
  padding: 25px 29px;
  border: 1px solid rgba(112, 153, 255, .09);
  border-radius: 15px;
  background: rgba(14, 16, 26, .54);
}

.ai-trend-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(112, 153, 255, .16);
  border-radius: 14px;
  background: rgba(112, 153, 255, .05);
  color: var(--blue);
  font-size: 25px;
}

.ai-trend-card h3 {
  margin: 5px 0 6px;
  font: 500 22px var(--font-barlow);
}

.ai-trend-card > div > p:last-child,
.ai-decisions-card > p:last-child {
  margin: 0;
  color: #909ab5;
  font-size: 11px;
  line-height: 1.65;
}

.ai-evidence-panel .ai-action-card + .ai-action-card {
  margin-top: 9px;
}

.ai-insight-no-items {
  padding: 28px 18px;
  border: 1px dashed rgba(255, 255, 255, .07);
  border-radius: 11px;
  color: #737d99;
  font-size: 10px;
  text-align: center;
}

.ai-decisions-card {
  grid-column: 1 / -1;
  padding: 23px 27px;
  border: 1px solid rgba(232, 201, 160, .09);
  border-radius: 15px;
  background: rgba(232, 201, 160, .025);
}

.ai-decisions-card > p:last-child {
  margin-top: 8px;
}

@media (max-width: 1050px) {
  .insights-controls {
    grid-template-columns: 1fr 245px;
  }

  .insights-controls > .primary {
    grid-column: 1 / -1;
  }

  .ai-insight-hero,
  .ai-strongest-pattern {
    grid-template-columns: 1fr;
  }

  .ai-confidence {
    border-top: 1px solid rgba(255, 255, 255, .06);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  #insights .insights-page-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .insights-update-meta {
    align-items: flex-start;
  }

  .insights-controls,
  .ai-insight-lower-grid {
    grid-template-columns: 1fr;
  }

  .insights-controls > .primary {
    grid-column: 1;
  }

  .insights-period > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ai-insight-metrics {
    grid-template-columns: 1fr 1fr;
    padding: 0;
  }

  .ai-insight-metrics > span:nth-child(3) {
    border-left: 0;
  }

  .ai-action-grid {
    grid-template-columns: 1fr;
  }

  .ai-trend-card,
  .ai-decisions-card {
    grid-column: 1;
  }
}

/* Global legibility and typography floor */
:root {
  --nexo-label-size: 10px;
  --nexo-helper-size: 11px;
  --nexo-body-size: 13px;
  --nexo-card-title-size: 15px;
}

body {
  font-size: 14px;
}

.eyebrow,
.sidebar nav > label {
  font-size: var(--nexo-label-size);
}

button,
.primary,
.secondary-button {
  font-size: 11px;
}

input,
textarea,
select {
  font-size: 13px;
}

main > header > span {
  font-size: 10px;
}

.search {
  font-size: 12px;
}

.search kbd {
  font-size: 9px;
}

.brand small {
  font-size: 9px;
}

.local strong,
.profile strong {
  font-size: 11px;
}

.local small,
.profile small {
  font-size: 10px;
}

.capture-head small,
.insight small,
.preview-metrics small,
.summary small,
.metrics small {
  font-size: 9px;
}

.capture textarea {
  font-size: 13px;
}

.capture-foot > small,
.big > small,
.panel-head > small {
  font-size: var(--nexo-helper-size);
}

.preview > p {
  font-size: 14px;
}

.chips span {
  font-size: 10px;
}

.metrics em {
  font-size: 10px;
}

.bar > i span,
.bar > small {
  font-size: 9px;
}

.donut small {
  font-size: 9px;
}

.focus p,
.focus p strong {
  font-size: 11px;
}

.insight h2 {
  font-size: 18px;
}

.insight p {
  font-size: 11px;
  line-height: 1.55;
}

.insight button,
.recent .section-head > button {
  font-size: 10px;
}

.entry-date span {
  font-size: 9px;
}

.entry-body h3 {
  font-size: 14px;
  line-height: 1.45;
}

.entry-body p {
  font-size: 11px;
  line-height: 1.6;
}

.entry-body > small {
  font-size: 10px;
}

.privacy > p:not(.eyebrow),
.big > p:not(.eyebrow) {
  font-size: 13px;
}

.privacy li {
  font-size: 11px;
}

.tip > span {
  font-size: 12px;
}

.toast {
  font-size: 11px;
}

.project-picker-title {
  font-size: 9px;
}

.project-picker-option {
  font-size: 12px;
}

.project-picker-option > small,
.project-picker-clear {
  font-size: 9px;
}

/* Insights page typography */
#insights .insights-update-meta small {
  font-size: 11px;
}

#insights .insights-update-meta strong {
  font-size: 12px;
}

#insights .insights-period > small,
#insights .insights-project-filter {
  font-size: 10px;
}

#insights .insights-period button {
  font-size: 12px;
}

#insights .insights-controls > .primary {
  font-size: 11px;
}

#insights .ai-insights-loading strong,
#insights .ai-insights-error strong {
  font-size: 15px;
}

#insights .ai-insights-loading small,
#insights .ai-insights-error small {
  font-size: 12px;
}

#insights .ai-insight-kicker {
  font-size: 10px;
}

#insights .ai-insight-hero-copy > p {
  font-size: 14px;
}

#insights .ai-confidence > span small,
#insights .ai-insight-metrics small {
  font-size: 9px;
}

#insights .ai-confidence > p {
  font-size: 12px;
}

#insights .ai-confidence > em {
  font-size: 9px;
}

#insights .ai-strongest-pattern > div > p:last-child {
  font-size: 13px;
}

#insights .ai-strongest-pattern li {
  font-size: 12px;
}

#insights .ai-section-heading > small {
  font-size: 11px;
}

#insights .ai-action-card h4 {
  font-size: 15px;
}

#insights .ai-action-card p {
  font-size: 13px;
}

#insights .ai-action-card small {
  font-size: 11px;
}

#insights .ai-trend-card > div > p:last-child,
#insights .ai-decisions-card > p:last-child {
  font-size: 13px;
}

#insights .ai-insight-no-items {
  font-size: 12px;
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  .mobile button {
    font-size: 10px;
  }
}

/* AI provider settings */
.config-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 9px;
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  transition: color .2s, background .2s, border-color .2s;
}

.config-button:hover {
  border-color: rgba(112, 153, 255, .2);
  background: rgba(112, 153, 255, .06);
  color: var(--blue);
}

.ai-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, .72fr);
  gap: 18px;
  align-items: start;
}

.ai-settings,
.ai-security {
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(20, 22, 34, .66), rgba(12, 13, 21, .72));
  box-shadow: 0 22px 60px rgba(0, 0, 0, .18);
  backdrop-filter: blur(18px);
}

.ai-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 19px;
  padding: 28px;
}

.ai-settings-head {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 14px;
  margin-bottom: 5px;
}

.ai-settings-head > b,
.ai-security > b {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid rgba(196, 127, 255, .3);
  border-radius: 11px;
  background: rgba(196, 127, 255, .08);
  color: var(--violet);
}

.ai-settings-head > span {
  flex: 1;
}

.ai-settings-head small {
  color: var(--blue);
  font: 700 9px var(--font-barlow);
  letter-spacing: .18em;
}

.ai-settings-head h2,
.ai-security h2 {
  margin: 4px 0 0;
  font: 500 22px var(--font-barlow);
}

.ai-settings-head em {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  color: var(--muted);
  font: 700 9px var(--font-barlow);
  font-style: normal;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ai-settings-head em.is-ready {
  border-color: rgba(63, 209, 184, .24);
  background: rgba(63, 209, 184, .07);
  color: var(--green);
}

.ai-settings label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font: 600 10px var(--font-barlow);
  letter-spacing: .13em;
}

.ai-settings input,
.ai-settings select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  outline: none;
  background: rgba(3, 4, 9, .38);
  color: var(--text);
  font: 400 13px var(--font-outfit);
  letter-spacing: 0;
  transition: border-color .2s, box-shadow .2s;
}

.ai-settings input:focus,
.ai-settings select:focus {
  border-color: rgba(112, 153, 255, .42);
  box-shadow: 0 0 0 3px rgba(112, 153, 255, .06);
}

.ai-settings option {
  background: #11131d;
}

.secret-field {
  position: relative;
}

.secret-field input {
  padding-right: 48px;
}

.secret-field button {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}

.secret-field button:hover {
  background: rgba(255, 255, 255, .04);
  color: var(--text);
}

.custom-endpoint {
  grid-column: 1 / -1;
}

.remember-key {
  grid-column: 1 / -1;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 11px !important;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px;
  background: rgba(255, 255, 255, .018);
  cursor: pointer;
}

.remember-key input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

.remember-key span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.remember-key strong {
  color: #d8dced;
  font-size: 11px;
  letter-spacing: .04em;
}

.remember-key small {
  color: var(--muted);
  font: 400 10px var(--font-outfit);
  letter-spacing: 0;
}

.ai-settings-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.secondary-button {
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  font-size: 11px;
}

.secondary-button:hover {
  border-color: rgba(255, 255, 255, .14);
  color: var(--text);
}

.primary:disabled {
  cursor: wait;
  opacity: .72;
}

.primary.is-loading {
  position: relative;
  overflow: hidden;
}

.primary.is-loading::after {
  position: absolute;
  right: 12px;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, .25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ai-button-spin .75s linear infinite;
  content: "";
}

.toast.is-error {
  border-color: rgba(232, 134, 160, .28);
  background: rgba(46, 18, 28, .92);
  color: #ffc4d3;
}

.preview.is-ai-result {
  border-color: rgba(112, 153, 255, .27);
}

@keyframes ai-button-spin {
  to {
    transform: rotate(1turn);
  }
}

.ai-security {
  padding: 27px;
}

.ai-security > b {
  margin-bottom: 20px;
  border-color: rgba(63, 209, 184, .25);
  background: rgba(63, 209, 184, .06);
  color: var(--green);
}

.ai-security > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.ai-security ul {
  padding: 0;
  color: #b9bfd5;
  font-size: 11px;
  line-height: 2.05;
  list-style: none;
}

.security-note {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid rgba(232, 201, 160, .13);
  border-radius: 10px;
  background: rgba(232, 201, 160, .035);
}

.security-note strong {
  color: var(--gold);
  font-size: 10px;
}

.security-note span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .ai-settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .ai-settings {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .ai-settings label {
    grid-column: 1;
  }

  .ai-settings-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .ai-settings-head em {
    margin-left: 54px;
  }

  .ai-settings-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}

/* Project experience refresh — keep after legacy project rules */
#projetos > .page.inner {
  width: min(100%, 1280px);
  max-width: 1280px;
  padding-top: 46px;
}

#projetos .projects-head {
  align-items: center;
  margin-bottom: 34px;
}

#projetos .projects-head h1 {
  margin-top: 10px;
  font-size: clamp(48px, 5vw, 68px);
}

#projetos .projects-head > span > small {
  font-size: 14px;
}

#projetos .projects-head-actions {
  align-items: center;
}

#projetos .project-summary {
  min-width: 136px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(14, 16, 25, .5);
  text-align: left;
}

#projetos .projects-layout {
  display: block;
}

#projetos .project-form:not([hidden]) {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 30px;
  padding: 28px 30px;
}

#projetos .projects-content > .section-head {
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

#projetos .projects-content h2 {
  font-size: 25px;
}

#projetos .project-toolbar {
  margin-left: auto;
}

#projetos .projects-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

#projetos .project-card {
  display: grid;
  min-height: 176px;
  grid-template-columns: 132px minmax(260px, 1fr) minmax(300px, .72fr) 170px;
  align-items: center;
  gap: 24px;
  padding: 26px 28px;
  border-radius: 17px;
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--project-color) 8%, transparent), transparent 27%),
    linear-gradient(145deg, rgba(19, 21, 33, .72), rgba(10, 11, 18, .72));
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

#projetos .project-card:hover {
  border-color: color-mix(in srgb, var(--project-color) 28%, rgba(255, 255, 255, .08));
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--project-color) 11%, transparent), transparent 30%),
    linear-gradient(145deg, rgba(22, 24, 38, .78), rgba(11, 12, 20, .76));
  box-shadow: 0 24px 58px rgba(0, 0, 0, .22);
  transform: translateY(-2px);
}

#projetos .project-card::after {
  width: 260px;
  height: 170px;
  opacity: .7;
}

#projetos .project-card-top {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

#projetos .project-card-top > div {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 7px;
}

#projetos .project-logo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
}

#projetos .project-card-top small,
#projetos .project-card-copy > small {
  color: #737b98;
  font-size: 10px;
  line-height: 1.35;
}

#projetos .project-card-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

#projetos .project-card-copy h3 {
  margin: 0 0 8px;
  font: 500 31px/1.05 var(--font-barlow);
}

#projetos .project-card-copy p {
  display: -webkit-box;
  overflow: hidden;
  max-width: 570px;
  margin: 0 0 12px;
  color: #9da5c0;
  font-size: 12px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#projetos .project-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 0;
  margin: 0;
  padding: 8px 24px;
  border-right: 1px solid rgba(255, 255, 255, .06);
  border-left: 1px solid rgba(255, 255, 255, .06);
}

#projetos .project-card-stats span {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

#projetos .project-card-stats strong {
  font-size: 25px;
}

#projetos .project-card-stats small {
  font-size: 8px;
}

#projetos .project-card-foot {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 13px;
  margin: 0;
}

#projetos .project-card-foot label {
  width: 100%;
}

#projetos .project-card-foot select {
  width: 100%;
  height: 35px;
  font-size: 10px;
}

#projetos .project-card-foot > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #b9c3df;
  font-size: 11px;
}

#projetos .project-card-foot > span b {
  color: var(--project-color);
  font-size: 17px;
  font-weight: 400;
  transition: transform .2s ease;
}

#projetos .project-card:hover .project-card-foot > span b {
  transform: translateX(4px);
}

#projeto-detalhe .project-page {
  width: min(100%, 1300px);
  max-width: 1300px;
  padding-top: 30px;
}

#projeto-detalhe .project-page-nav {
  margin-bottom: 20px;
}

#projeto-detalhe .project-page-nav > button {
  padding: 8px 0;
  font-size: 12px;
}

#projeto-detalhe .project-page-hero {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 285px;
  align-items: center;
  gap: 24px;
  padding: 35px 38px;
  border-radius: 19px 19px 0 0;
}

#projeto-detalhe .project-detail-logo {
  width: 76px;
  height: 76px;
  flex-basis: 76px;
}

#projeto-detalhe .project-hero-copy {
  min-width: 0;
}

#projeto-detalhe .project-hero-copy h2 {
  margin: 9px 0 7px;
  font-size: clamp(38px, 4vw, 52px);
}

#projeto-detalhe .project-hero-copy p {
  max-width: 720px;
  color: #a7afc8;
  font-size: 13px;
  line-height: 1.65;
}

#projeto-detalhe .project-hero-context {
  display: grid;
  gap: 16px;
  padding: 3px 0 3px 24px;
  border-left: 1px solid rgba(255, 255, 255, .075);
}

#projeto-detalhe .project-hero-context span {
  display: block;
}

#projeto-detalhe .project-hero-context small {
  display: block;
  color: #69728e;
  font: 600 8px var(--font-barlow);
  letter-spacing: .14em;
}

#projeto-detalhe .project-hero-context strong {
  display: block;
  margin-top: 5px;
  color: #d5daea;
  font-size: 12px;
  font-weight: 500;
}

#projeto-detalhe .project-detail-metrics {
  margin: 0;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-top: 0;
  border-radius: 0 0 19px 19px;
}

#projeto-detalhe .project-detail-metrics > span {
  padding: 20px 16px 22px;
}

#projeto-detalhe .project-detail-metrics > span + span {
  border-left: 1px solid rgba(255, 255, 255, .055);
}

#projeto-detalhe .project-detail-metrics small {
  font-size: 8px;
}

#projeto-detalhe .project-detail-metrics strong {
  font-size: 29px;
}

#projeto-detalhe .project-page-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .62fr);
  gap: 20px;
  margin-top: 30px;
}

#projeto-detalhe .project-page-section-head {
  align-items: flex-end;
  min-height: 52px;
  margin-bottom: 15px;
}

#projeto-detalhe .project-page-section-head h3,
#projeto-detalhe .project-page-aside h3 {
  font-size: 27px;
}

#projeto-detalhe .project-page-section-head > small {
  max-width: 280px;
  color: #6f7792;
  font-size: 10px;
  line-height: 1.45;
  text-align: right;
}

#projeto-detalhe .project-documentation-empty {
  display: flex;
  min-height: 270px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 38px;
  border-radius: 17px;
}

#projeto-detalhe .project-documentation-empty h3 {
  font-size: 31px;
}

#projeto-detalhe .project-documentation-empty > p:not(.eyebrow) {
  font-size: 12px;
}

#projeto-detalhe .project-page-aside {
  top: 88px;
  padding: 26px;
  border-radius: 17px;
}

#projeto-detalhe .project-aside-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

#projeto-detalhe .project-aside-head > small {
  color: #68718d;
  font-size: 9px;
  white-space: nowrap;
}

#projeto-detalhe .project-recent-list article {
  position: relative;
  padding: 18px 0 18px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

#projeto-detalhe .project-recent-list article::before {
  position: absolute;
  top: 23px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(112, 153, 255, .08);
  content: "";
}

#projeto-detalhe .project-recent-list time,
#projeto-detalhe .project-recent-list small {
  display: block;
  color: #747d99;
  font-size: 9px;
}

#projeto-detalhe .project-recent-list strong {
  display: block;
  margin: 6px 0;
  color: #d4d9e9;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

#projeto-detalhe .project-local-note {
  margin: 20px 0 0;
  color: #68718d;
  font-size: 10px;
  line-height: 1.55;
}

#projeto-detalhe .project-recent-empty {
  padding: 32px 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

#projeto-detalhe .project-page > .project-evolution,
#projeto-detalhe .project-page > .project-timeline {
  margin-top: 20px;
  padding: 28px 30px;
  border-radius: 17px;
}

#projeto-detalhe .project-evolution h3,
#projeto-detalhe .project-timeline h3 {
  font-size: 25px;
}

#projeto-detalhe .timeline-entry h4 {
  font-size: 14px;
}

#projeto-detalhe .timeline-entry p {
  font-size: 11px;
}

#projeto-detalhe .project-document-cover p,
#projeto-detalhe .project-doc-section > p:not(.eyebrow),
#projeto-detalhe .project-doc-conclusion > p:last-child {
  font-size: 12px;
}

#projeto-detalhe .project-doc-item h5 {
  font-size: 13px;
}

#projeto-detalhe .project-doc-item p,
#projeto-detalhe .project-doc-next span {
  font-size: 11px;
}

@media (max-width: 1120px) {
  #projetos .project-card {
    grid-template-columns: 110px minmax(240px, 1fr) minmax(260px, .8fr);
  }

  #projetos .project-card-foot {
    grid-column: 2 / -1;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  #projetos .project-card-foot label {
    width: 180px;
  }
}

@media (max-width: 860px) {
  #projetos .project-card {
    grid-template-columns: 84px 1fr;
  }

  #projetos .project-card-stats,
  #projetos .project-card-foot {
    grid-column: 1 / -1;
  }

  #projetos .project-card-stats {
    border-right: 0;
    border-left: 0;
  }

  #projeto-detalhe .project-page-hero {
    grid-template-columns: 76px 1fr;
  }

  #projeto-detalhe .project-hero-context {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    padding: 18px 0 0;
    border-top: 1px solid rgba(255, 255, 255, .075);
    border-left: 0;
  }

  #projeto-detalhe .project-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  #projetos .projects-head {
    align-items: stretch;
  }

  #projetos .projects-head-actions {
    align-items: stretch;
  }

  #projetos .project-summary {
    flex: 1;
  }

  #projetos .project-form:not([hidden]) {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  #projetos .project-card {
    display: block;
    padding: 23px;
  }

  #projetos .project-card-top {
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
  }

  #projetos .project-card-copy {
    margin-top: 22px;
  }

  #projetos .project-card-stats {
    margin-top: 22px;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, .06);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
  }

  #projetos .project-card-foot {
    margin-top: 18px;
  }

  #projeto-detalhe .project-page-hero {
    grid-template-columns: 1fr;
    padding: 27px 23px;
  }

  #projeto-detalhe .project-hero-context {
    grid-column: 1;
  }

  #projeto-detalhe .project-detail-metrics {
    grid-template-columns: 1fr 1fr;
    padding: 0;
  }

  #projeto-detalhe .project-detail-metrics > span:nth-child(3) {
    border-left: 0;
  }

  #projeto-detalhe .project-page-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #projeto-detalhe .project-page-section-head > small {
    text-align: left;
  }
}

@media print {
  .printing-project #projeto-detalhe .project-page {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .printing-project #projeto-detalhe .project-page-hero {
    display: grid !important;
    grid-template-columns: 22mm 1fr !important;
    padding: 8mm !important;
  }

  .printing-project #projeto-detalhe .project-hero-context {
    display: none !important;
  }

  .printing-project #projeto-detalhe .project-page-grid {
    display: block !important;
    margin-top: 5mm !important;
  }
}

/* Project detail information architecture */
#projeto-detalhe .project-documentation-zone {
  margin-top: 32px;
}

#projeto-detalhe .project-documentation-zone .project-page-section-head {
  padding: 0 2px;
}

#projeto-detalhe .project-documentation-empty {
  display: grid;
  min-height: 0;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 30px 32px;
  border-style: solid;
  border-color: rgba(164, 108, 255, .18);
  background:
    radial-gradient(circle at 6% 50%, rgba(164, 108, 255, .1), transparent 22%),
    linear-gradient(135deg, rgba(18, 18, 31, .78), rgba(11, 12, 20, .7));
  text-align: left;
}

#projeto-detalhe .project-documentation-empty > b {
  width: 52px;
  height: 52px;
  margin: 0;
  border-radius: 14px;
}

#projeto-detalhe .project-documentation-empty > div {
  min-width: 0;
}

#projeto-detalhe .project-documentation-empty h3 {
  margin: 5px 0 7px;
  font-size: 27px;
}

#projeto-detalhe .project-documentation-empty > div > p:last-child {
  max-width: 680px;
  margin: 0;
  color: #838ca8;
  font-size: 11px;
  line-height: 1.6;
}

#projeto-detalhe .project-documentation-empty > .primary {
  min-width: 220px;
  white-space: nowrap;
}

#projeto-detalhe .project-insights-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr);
  gap: 20px;
  margin-top: 20px;
}

#projeto-detalhe .project-recent-panel,
#projeto-detalhe .project-insights-grid > .project-evolution {
  min-width: 0;
  margin: 0;
  padding: 27px 30px;
  border: 1px solid rgba(255, 255, 255, .065);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(17, 19, 30, .62), rgba(10, 11, 18, .62));
  backdrop-filter: blur(15px);
}

#projeto-detalhe .project-recent-panel .project-aside-head {
  padding-bottom: 17px;
}

#projeto-detalhe .project-recent-panel .project-aside-head h3,
#projeto-detalhe .project-insights-grid .project-evolution h3 {
  margin: 5px 0 0;
  font: 500 25px var(--font-barlow);
}

#projeto-detalhe .project-recent-panel .project-recent-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 17px;
}

#projeto-detalhe .project-recent-panel .project-recent-list article {
  min-height: 128px;
  padding: 17px 17px 16px;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 12px;
  background: rgba(255, 255, 255, .018);
}

#projeto-detalhe .project-recent-panel .project-recent-list article::before {
  top: 20px;
  left: -4px;
}

#projeto-detalhe .project-recent-panel .project-recent-list strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

#projeto-detalhe .project-insights-grid .project-evolution .section-head {
  align-items: flex-end;
}

#projeto-detalhe .project-rhythm-single {
  display: grid;
  grid-template-columns: 116px 1fr;
  align-items: center;
  gap: 24px;
  min-height: 150px;
  margin-top: 17px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 13px;
  background: rgba(0, 0, 0, .12);
}

#projeto-detalhe .project-rhythm-ring {
  position: relative;
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--rhythm) * 1%), rgba(112, 153, 255, .09) 0);
}

#projeto-detalhe .project-rhythm-ring::after {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: inherit;
  background: #10121d;
  content: "";
}

#projeto-detalhe .project-rhythm-ring strong,
#projeto-detalhe .project-rhythm-ring small {
  position: absolute;
  z-index: 1;
}

#projeto-detalhe .project-rhythm-ring strong {
  margin-top: -12px;
  color: #e6e9f5;
  font: 500 27px var(--font-barlow);
}

#projeto-detalhe .project-rhythm-ring small {
  margin-top: 29px;
  color: #727b97;
  font: 600 7px var(--font-barlow);
  letter-spacing: .15em;
}

#projeto-detalhe .project-rhythm-single > div:last-child > strong {
  color: #dce1f0;
  font-size: 13px;
  font-weight: 500;
}

#projeto-detalhe .project-rhythm-single > div:last-child > p {
  margin: 8px 0 0;
  color: #7e87a3;
  font-size: 10px;
  line-height: 1.6;
}

#projeto-detalhe .project-insights-grid .project-evolution-bars {
  height: 165px;
}

#projeto-detalhe .project-page > .project-timeline {
  margin-top: 20px;
}

@media (max-width: 1080px) {
  #projeto-detalhe .project-insights-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  #projeto-detalhe .project-documentation-empty {
    grid-template-columns: 52px 1fr;
  }

  #projeto-detalhe .project-documentation-empty > .primary {
    width: 100%;
    grid-column: 1 / -1;
  }

  #projeto-detalhe .project-recent-panel .project-recent-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  #projeto-detalhe .project-documentation-empty {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  #projeto-detalhe .project-rhythm-single {
    grid-template-columns: 1fr;
  }
}

@media print {
  .printing-project #projeto-detalhe .project-insights-grid {
    display: none !important;
  }
}

/* Structured project timeline content */
#projeto-detalhe .timeline-entry {
  padding: 20px 22px;
}

#projeto-detalhe .timeline-entry > h4 {
  max-width: 1020px;
  margin: 10px 0 0;
  color: #e0e4f2;
  font-size: 15px;
  line-height: 1.45;
}

#projeto-detalhe .timeline-details {
  margin-top: 15px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 11px;
  background: rgba(4, 5, 10, .14);
}

#projeto-detalhe .timeline-details > summary {
  position: relative;
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  padding: 0 42px 0 15px;
  border-radius: 10px;
  color: #aeb6cf;
  cursor: pointer;
  list-style: none;
  transition: color .18s ease, background .18s ease;
}

#projeto-detalhe .timeline-details > summary::-webkit-details-marker {
  display: none;
}

#projeto-detalhe .timeline-details > summary:hover {
  background: rgba(112, 153, 255, .035);
  color: #d7dced;
}

#projeto-detalhe .timeline-details > summary::after {
  position: absolute;
  right: 16px;
  color: var(--blue);
  font-size: 13px;
  content: "＋";
  transition: transform .2s ease;
}

#projeto-detalhe .timeline-details[open] > summary {
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  border-radius: 10px 10px 0 0;
  background: rgba(112, 153, 255, .025);
}

#projeto-detalhe .timeline-details[open] > summary::after {
  content: "−";
}

#projeto-detalhe .timeline-details > summary > span {
  font-size: 11px;
  font-weight: 500;
}

#projeto-detalhe .timeline-details > summary > small {
  color: #69728d;
  font-size: 9px;
}

#projeto-detalhe .timeline-details-body {
  padding: 20px;
  animation: timeline-details-in .2s ease-out;
}

@keyframes timeline-details-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

#projeto-detalhe .timeline-rich-meta {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) minmax(120px, .55fr) minmax(260px, 1.4fr);
  align-items: start;
  gap: 9px;
  margin-bottom: 18px;
}

#projeto-detalhe .timeline-rich-meta > span {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(112, 153, 255, .08);
  border-radius: 9px;
  background: rgba(112, 153, 255, .025);
}

#projeto-detalhe .timeline-rich-meta small {
  display: block;
  color: #68728e;
  font: 600 7px var(--font-barlow);
  letter-spacing: .13em;
  text-transform: uppercase;
}

#projeto-detalhe .timeline-rich-meta strong {
  display: block;
  margin-top: 5px;
  color: #c5cbdc;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}

#projeto-detalhe .timeline-rich-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#projeto-detalhe .timeline-rich-section {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, .045);
  border-radius: 10px;
  background: rgba(255, 255, 255, .014);
}

#projeto-detalhe .timeline-rich-section.is-wide {
  grid-column: 1 / -1;
}

#projeto-detalhe .timeline-rich-section h5 {
  margin: 0 0 8px;
  color: #849cff;
  font: 600 9px var(--font-barlow);
  letter-spacing: .09em;
  text-transform: uppercase;
}

#projeto-detalhe .timeline-rich-section p {
  margin: 0;
  color: #9ba4be;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-line;
}

#projeto-detalhe .timeline-details + ul {
  margin-top: 13px;
}

@media (max-width: 760px) {
  #projeto-detalhe .timeline-rich-meta,
  #projeto-detalhe .timeline-rich-sections {
    grid-template-columns: 1fr;
  }

  #projeto-detalhe .timeline-rich-section.is-wide {
    grid-column: 1;
  }

  #projeto-detalhe .timeline-details > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

@media print {
  .printing-project #projeto-detalhe .timeline-details {
    display: none !important;
  }
}

/* Project detail typography pass */
#projeto-detalhe .eyebrow {
  font-size: 9px;
  letter-spacing: .17em;
}

#projeto-detalhe .project-status {
  font-size: 9px;
}

#projeto-detalhe .project-page-nav > button {
  font-size: 13px;
}

#projeto-detalhe .project-hero-copy p {
  font-size: 14px;
}

#projeto-detalhe .project-hero-context small,
#projeto-detalhe .project-detail-metrics small {
  font-size: 9px;
}

#projeto-detalhe .project-hero-context strong {
  font-size: 13px;
}

#projeto-detalhe .project-page-section-head > small,
#projeto-detalhe .project-aside-head > small,
#projeto-detalhe .project-insights-grid .section-head > small {
  font-size: 11px;
}

#projeto-detalhe .project-documentation-empty > div > p:last-child {
  font-size: 13px;
}

#projeto-detalhe .project-recent-list time,
#projeto-detalhe .project-recent-list small {
  font-size: 10px;
}

#projeto-detalhe .project-recent-list strong {
  font-size: 13px;
}

#projeto-detalhe .project-rhythm-single > div:last-child > strong {
  font-size: 14px;
}

#projeto-detalhe .project-rhythm-single > div:last-child > p {
  font-size: 12px;
}

#projeto-detalhe .project-timeline .section-head > small {
  font-size: 11px;
}

#projeto-detalhe .timeline-entry time {
  font-size: 10px;
}

#projeto-detalhe .timeline-entry > div > span {
  font-size: 10px;
}

#projeto-detalhe .timeline-entry > h4 {
  font-size: 16px;
}

#projeto-detalhe .timeline-details > summary > span {
  font-size: 13px;
}

#projeto-detalhe .timeline-details > summary > small {
  font-size: 10px;
}

#projeto-detalhe .timeline-rich-meta small {
  font-size: 8px;
}

#projeto-detalhe .timeline-rich-meta strong {
  font-size: 12px;
  line-height: 1.55;
}

#projeto-detalhe .timeline-rich-section h5 {
  margin-bottom: 10px;
  font-size: 10px;
}

#projeto-detalhe .timeline-rich-section p {
  color: #aeb6ce;
  font-size: 13px;
  line-height: 1.75;
}

#projeto-detalhe .timeline-entry li {
  padding: 6px 9px;
  font-size: 10px;
}

#projeto-detalhe .project-document-cover p,
#projeto-detalhe .project-doc-section > p:not(.eyebrow),
#projeto-detalhe .project-doc-conclusion > p:last-child {
  font-size: 13px;
  line-height: 1.8;
}

#projeto-detalhe .project-doc-item h5 {
  font-size: 14px;
}

#projeto-detalhe .project-doc-item p,
#projeto-detalhe .project-doc-next span {
  font-size: 12px;
}

/* Balanced project actions and reusable select pattern */
#projetos .projects-head-actions {
  display: grid;
  grid-template-columns: 170px 170px;
  gap: 10px;
}

#projetos .project-summary,
#projetos .projects-head-actions > .primary {
  width: 170px;
  min-width: 170px;
  height: 54px;
  min-height: 54px;
  border-radius: 13px;
}

#projetos .project-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px 0 16px;
  background: linear-gradient(145deg, rgba(18, 21, 32, .72), rgba(10, 11, 18, .68));
}

#projetos .project-summary small {
  max-width: none;
  color: #939cb7;
  font-size: 10px;
  letter-spacing: .1em;
  line-height: 1;
}

#projetos .project-summary strong {
  display: grid;
  width: 34px;
  height: 34px;
  margin: 0;
  place-items: center;
  border: 1px solid rgba(63, 209, 184, .15);
  border-radius: 9px;
  background: rgba(63, 209, 184, .055);
  font-size: 21px;
}

#projetos .projects-head-actions > .primary {
  padding: 0 15px;
  font-size: 10px;
}

.ui-picker {
  width: 100%;
}

.ui-picker-trigger {
  min-height: 38px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 11px;
}

.ui-picker-value {
  gap: 8px;
}

.ui-status-dot {
  width: 8px;
  height: 8px;
  min-width: 8px !important;
  max-width: 8px !important;
  flex: 0 0 8px;
  padding: 0 !important;
  border: 2px solid rgba(135, 145, 173, .2);
  border-radius: 50%;
  background: #77809a;
  box-shadow: 0 0 0 3px rgba(119, 128, 154, .05);
}

.ui-status-dot.active {
  border-color: rgba(63, 209, 184, .25);
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(63, 209, 184, .06);
}

.ui-status-dot.planning {
  border-color: rgba(112, 153, 255, .28);
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(112, 153, 255, .07);
}

.ui-status-dot.paused {
  border-color: rgba(232, 201, 160, .24);
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 201, 160, .06);
}

.ui-status-dot.completed {
  border-color: rgba(196, 127, 255, .25);
  background: var(--violet);
  box-shadow: 0 0 0 3px rgba(196, 127, 255, .06);
}

.ui-picker-menu {
  padding: 7px;
}

.ui-picker-option {
  min-height: 40px;
  gap: 9px;
  padding: 7px 10px;
  font-size: 12px;
}

.ui-picker-option > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.project-picker-option.ui-picker-option > .ui-status-dot {
  width: 8px !important;
  min-width: 8px !important;
  max-width: 8px !important;
  flex: 0 0 8px !important;
}

.ui-picker-option > b {
  color: var(--blue);
  font-size: 10px;
  font-weight: 500;
}

#projetos .project-card-foot .ui-picker-trigger {
  height: 36px;
  min-height: 36px;
  background: rgba(6, 7, 13, .52);
}

#projetos .project-form .ui-picker {
  margin-top: 8px;
}

#projetos .project-form .ui-picker-trigger {
  height: 44px;
  min-height: 44px;
}

#projetos .project-filters {
  gap: 4px;
  padding: 5px;
  border-radius: 11px;
}

#projetos .project-filters button {
  min-height: 34px;
  padding: 0 14px;
  font-size: 11px;
}

#projetos #project-count-label {
  font-size: 12px;
}

@media (max-width: 620px) {
  #projetos .projects-head-actions {
    grid-template-columns: 1fr 1fr;
  }

  #projetos .project-summary,
  #projetos .projects-head-actions > .primary {
    width: 100%;
    min-width: 0;
  }
}

/* New project creation workspace */
#projetos .project-form:not([hidden]) {
  display: block;
  overflow: hidden;
  padding: 0;
  border-radius: 18px;
}

#projetos .project-form-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: linear-gradient(90deg, rgba(112, 153, 255, .045), transparent 42%);
}

#projetos .project-form-head > b {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}

#projetos .project-form-head h2 {
  font-size: 24px;
}

#projetos .project-form-head span > small {
  display: block;
  margin-top: 5px;
  color: #7d86a2;
  font-size: 11px;
}

#projetos .project-form-head > em {
  color: #69738f;
  font-size: 10px;
  font-style: normal;
}

#projetos .project-form-body {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
}

#projetos .project-form-main,
#projetos .project-form-visual {
  min-width: 0;
  padding: 28px;
}

#projetos .project-form-visual {
  border-left: 1px solid rgba(255, 255, 255, .06);
  background: rgba(5, 6, 11, .12);
}

#projetos .project-form-section-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 24px;
}

#projetos .project-form-section-title > b {
  color: var(--blue);
  font: 500 10px var(--font-mono);
}

#projetos .project-form-section-title > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#projetos .project-form-section-title strong {
  color: #d7dceb;
  font-size: 13px;
  font-weight: 500;
}

#projetos .project-form-section-title small {
  color: #717b96;
  font-size: 10px;
}

#projetos .project-form-main > label:last-child,
#projetos .project-form-visual > label:last-child {
  margin-bottom: 0;
}

#projetos .project-form-main textarea {
  min-height: 132px;
}

#projetos .project-field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#projetos .project-field-heading output {
  color: #75809c;
  font: 500 9px var(--font-mono);
  letter-spacing: 0;
}

#projetos .project-description-label:focus-within .project-field-heading output {
  color: var(--blue);
}

#projetos .project-logo-upload {
  min-height: 82px;
  padding: 14px;
  border-radius: 12px;
}

#projetos .project-logo-preview {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
  border-radius: 13px;
}

#projetos .project-form-row {
  grid-template-columns: 138px minmax(0, 1fr);
  margin-top: 2px;
}

#projetos .project-color-field {
  display: grid;
  height: 44px;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 5px 11px 5px 5px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: rgba(3, 4, 9, .4);
}

#projetos .project-color-field input[type="color"] {
  width: 43px;
  height: 32px;
  margin: 0;
  padding: 2px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

#projetos .project-color-field output {
  color: #aeb6ce;
  font: 500 10px var(--font-mono);
}

#projetos .project-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  background: rgba(4, 5, 10, .18);
}

#projetos .project-form-actions > p {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #7c86a1;
  font-size: 10px;
}

#projetos .project-form-actions > p b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(63, 209, 184, .16);
  border-radius: 7px;
  background: rgba(63, 209, 184, .045);
  color: var(--green);
  font-size: 9px;
}

#projetos .project-form-actions > div {
  display: flex;
  gap: 9px;
}

#projetos .project-form-actions .secondary-button,
#projetos .project-form-actions .primary {
  min-width: 128px;
}

@media (max-width: 900px) {
  #projetos .project-form-body {
    grid-template-columns: 1fr;
  }

  #projetos .project-form-visual {
    border-top: 1px solid rgba(255, 255, 255, .06);
    border-left: 0;
  }
}

@media (max-width: 620px) {
  #projetos .project-form-head {
    grid-template-columns: 44px 1fr;
    padding: 21px 19px;
  }

  #projetos .project-form-head > em {
    display: none;
  }

  #projetos .project-form-main,
  #projetos .project-form-visual {
    padding: 24px 19px;
  }

  #projetos .project-form-row {
    grid-template-columns: 1fr;
  }

  #projetos .project-form-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 18px 19px;
  }

  #projetos .project-form-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Final typography overrides for late component rules */
.security-note span {
  font-size: 11px;
}

#projetos .project-card-stats small {
  font-size: 9px;
}

#projetos .project-card-top small,
#projetos .project-card-copy > small {
  font-size: 11px;
}

#projetos .project-card-foot label,
#projetos .project-form label {
  font-size: 10px;
}

#projetos .project-form-section-title small,
#projetos .project-form-head span > small,
#projetos .project-form-actions > p {
  font-size: 11px;
}

#projeto-detalhe .eyebrow,
#projeto-detalhe .project-status,
#projeto-detalhe .project-hero-context small,
#projeto-detalhe .project-detail-metrics small,
#projeto-detalhe .timeline-rich-meta small {
  font-size: 10px;
}

#projeto-detalhe .project-aside-head > small,
#projeto-detalhe .project-recent-list time,
#projeto-detalhe .project-recent-list small,
#projeto-detalhe .timeline-details > summary > small {
  font-size: 11px;
}

#projeto-detalhe .timeline-entry time,
#projeto-detalhe .timeline-entry > div > span {
  font-size: 11px;
}

/* Unified page container and spacing rhythm */
:root {
  --nexo-page-max: 1280px;
  --nexo-page-gutter: 40px;
  --nexo-page-top: 48px;
  --nexo-page-bottom: 100px;
  --nexo-page-title-gap: 32px;
}

main > .view > .page,
#painel > .page,
#registrar > .page,
#insights > .page.inner,
#projetos > .page.inner,
#projeto-detalhe > .page.inner,
#historico > .page {
  width: min(100%, var(--nexo-page-max));
  max-width: var(--nexo-page-max);
  margin-right: auto;
  margin-left: auto;
  padding: var(--nexo-page-top) var(--nexo-page-gutter) var(--nexo-page-bottom);
}

main > .view > .page > .title,
main > .view > .page > .welcome,
#projetos .projects-head,
#insights .insights-page-title {
  margin-bottom: var(--nexo-page-title-gap);
}

#projeto-detalhe > .project-page {
  padding-top: 38px;
}

@media (max-width: 1100px) {
  :root {
    --nexo-page-gutter: 30px;
    --nexo-page-top: 40px;
    --nexo-page-bottom: 92px;
  }
}

@media (max-width: 820px) {
  :root {
    --nexo-page-gutter: 20px;
    --nexo-page-top: 32px;
    --nexo-page-bottom: 112px;
    --nexo-page-title-gap: 28px;
  }
}

@media (max-width: 560px) {
  :root {
    --nexo-page-gutter: 18px;
    --nexo-page-top: 28px;
    --nexo-page-bottom: 110px;
    --nexo-page-title-gap: 24px;
  }
}

@media print {
  .printing-project #projeto-detalhe > .project-page {
    max-width: none !important;
    padding: 0 !important;
  }
}

/* Supabase cloud connection */
.sidebar .cloud-status-trigger {
  position: relative;
  overflow: hidden;
  width: calc(100% - 28px);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.sidebar .cloud-status-trigger:hover {
  border-color: rgba(112, 153, 255, .22);
  background: rgba(112, 153, 255, .055);
  transform: translateY(-1px);
}

.sidebar .cloud-status-trigger:focus-visible {
  outline: 2px solid rgba(112, 153, 255, .5);
  outline-offset: 2px;
}

.cloud-status-trigger[data-cloud-state="local"] > i,
.cloud-status-trigger[data-cloud-state="local"] > b {
  color: var(--muted);
}

.cloud-status-trigger[data-cloud-state="local"] > b {
  background: #707695;
  box-shadow: 0 0 8px rgba(112, 118, 149, .4);
}

.cloud-status-trigger[data-cloud-state="syncing"] > i {
  color: var(--blue);
  animation: cloud-breathe 1.7s ease-in-out infinite;
}

.cloud-status-trigger[data-cloud-state="syncing"] {
  border-color: rgba(112, 153, 255, .25);
  background: rgba(112, 153, 255, .05);
}

.cloud-status-trigger[data-cloud-state="syncing"] > b {
  background: var(--blue);
  box-shadow: 0 0 8px rgba(112, 153, 255, .72);
  animation: cloud-dot 1.7s ease-in-out infinite;
}

.cloud-status-trigger[data-cloud-state="synced"] > i {
  color: var(--green);
}

.cloud-status-trigger.sync-complete {
  animation: cloud-complete .85s ease-out;
}

.cloud-status-trigger[data-cloud-state="error"] > i {
  color: var(--gold);
}

.cloud-status-trigger[data-cloud-state="error"] > b {
  background: var(--gold);
  box-shadow: 0 0 9px rgba(232, 201, 160, .55);
}

.cloud-sync-progress {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 2px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(112, 153, 255, .08);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.cloud-sync-progress > i {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(112, 153, 255, .8), transparent);
  transform: translateX(-120%);
}

.cloud-status-trigger[data-cloud-state="syncing"] .cloud-sync-progress {
  opacity: 1;
}

.cloud-status-trigger[data-cloud-state="syncing"] .cloud-sync-progress > i {
  animation: cloud-progress 1.55s cubic-bezier(.42, 0, .25, 1) infinite;
}

#cloud-sync-now.is-syncing {
  position: relative;
  padding-left: 42px;
}

#cloud-sync-now.is-syncing::before {
  content: "";
  position: absolute;
  left: 20px;
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cloud-spin .8s linear infinite;
}

@keyframes cloud-breathe {
  50% { opacity: .58; transform: translateY(-1px) scale(.95); }
}

@keyframes cloud-dot {
  50% { opacity: .45; transform: scale(.72); }
}

@keyframes cloud-progress {
  to { transform: translateX(365%); }
}

@keyframes cloud-spin {
  to { transform: rotate(360deg); }
}

@keyframes cloud-complete {
  35% {
    border-color: rgba(79, 227, 196, .28);
    box-shadow: inset 0 0 22px rgba(79, 227, 196, .045);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cloud-status-trigger[data-cloud-state="syncing"] > i,
  .cloud-status-trigger[data-cloud-state="syncing"] > b,
  .cloud-status-trigger[data-cloud-state="syncing"] .cloud-sync-progress > i,
  #cloud-sync-now.is-syncing::before,
  .cloud-status-trigger.sync-complete {
    animation: none;
  }
}

.cloud-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 32px;
  border: 1px solid rgba(112, 153, 255, .22);
  border-radius: 22px;
  outline: 0;
  background:
    radial-gradient(circle at 90% 0, rgba(112, 153, 255, .14), transparent 33%),
    linear-gradient(150deg, rgba(19, 21, 34, .98), rgba(10, 11, 18, .99));
  box-shadow: 0 32px 100px rgba(0, 0, 0, .7), inset 0 1px rgba(255, 255, 255, .045);
  color: var(--text);
}

.cloud-dialog::backdrop {
  background: rgba(3, 4, 9, .72);
  backdrop-filter: blur(12px);
}

.cloud-dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.cloud-dialog-close:hover {
  border-color: rgba(112, 153, 255, .24);
  color: var(--text);
}

.cloud-dialog-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-right: 38px;
  margin-bottom: 26px;
}

.cloud-dialog-brand > b {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border: 1px solid rgba(63, 209, 184, .26);
  border-radius: 14px;
  background: rgba(63, 209, 184, .075);
  color: var(--green);
  font-size: 22px;
}

.cloud-dialog-brand > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cloud-dialog-brand small,
.cloud-account > small {
  color: var(--blue);
  font: 600 11px var(--font-barlow);
  letter-spacing: .18em;
}

.cloud-dialog-brand strong {
  font: 500 24px/1.15 var(--font-barlow);
}

.cloud-dialog section > p,
.cloud-account > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.cloud-dialog form {
  display: grid;
  gap: 16px;
}

.cloud-dialog form label {
  color: var(--secondary);
  font: 600 11px var(--font-barlow);
  letter-spacing: .12em;
}

.cloud-dialog input {
  width: 100%;
  margin-top: 8px;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: 0;
  background: rgba(4, 5, 10, .52);
  color: var(--text);
  font: 13px var(--font-outfit);
}

.cloud-dialog input:focus {
  border-color: rgba(112, 153, 255, .48);
  box-shadow: 0 0 0 3px rgba(112, 153, 255, .075);
}

.cloud-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.cloud-dialog-actions button {
  min-height: 44px;
  padding-right: 18px;
  padding-left: 18px;
}

.cloud-account {
  padding: 20px;
  border: 1px solid rgba(63, 209, 184, .16);
  border-radius: 14px;
  background: rgba(63, 209, 184, .035);
}

.cloud-account > strong {
  display: block;
  margin: 7px 0 14px;
  color: #dfe7ef;
  font-size: 15px;
}

.cloud-message {
  margin: 18px 0 0;
  padding: 11px 13px;
  border: 1px solid rgba(63, 209, 184, .16);
  border-radius: 10px;
  background: rgba(63, 209, 184, .045);
  color: #a9d8ce;
  font-size: 12px;
  line-height: 1.5;
}

.cloud-message.is-error {
  border-color: rgba(232, 201, 160, .2);
  background: rgba(232, 201, 160, .055);
  color: var(--gold);
}

.cloud-dialog footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.cloud-dialog footer i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

@media (max-width: 560px) {
  .cloud-dialog {
    padding: 26px 20px 22px;
    border-radius: 18px;
  }

  .cloud-dialog-brand strong {
    font-size: 21px;
  }

  .cloud-dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .cloud-dialog-actions button {
    width: 100%;
  }
}

/* Responsive layout system — desktop, tablet and mobile */
html.auth-pending,
html.auth-locked,
html.auth-pending body,
html.auth-locked body {
  height: 100%;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .sidebar {
    display: none;
  }

  main {
    margin-left: 0;
  }

  .ambient-shader {
    left: 0;
  }

  main > header {
    right: 0;
    height: 64px;
    margin-right: 0;
    padding: 0 26px;
    border-bottom: 1px solid rgba(159, 171, 224, .08);
    background: rgba(9, 10, 16, .72);
    backdrop-filter: blur(18px) saturate(1.08);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
  }

  .mobile {
    position: fixed;
    right: 18px;
    bottom: max(18px, env(safe-area-inset-bottom));
    left: 18px;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    padding: 8px;
    border: 1px solid rgba(159, 171, 224, .14);
    border-radius: 16px;
    background: rgba(14, 16, 27, .92);
    box-shadow: 0 20px 55px rgba(0, 0, 0, .4);
    backdrop-filter: blur(22px) saturate(1.12);
    -webkit-backdrop-filter: blur(22px) saturate(1.12);
  }

  .mobile button {
    display: flex;
    min-width: 0;
    min-height: 48px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px 2px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-size: 9px;
  }

  .mobile button i {
    color: currentColor;
    font-size: 17px;
    font-style: normal;
  }

  .mobile button.active {
    background: rgba(112, 153, 255, .1);
    color: var(--blue);
  }

  :root {
    --nexo-page-gutter: 28px;
    --nexo-page-top: 38px;
    --nexo-page-bottom: 124px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-grid,
  .register-grid,
  #projeto-detalhe .project-page-grid,
  #projeto-detalhe .project-insights-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-head,
  .projects-head,
  #insights .insights-page-title {
    gap: 20px;
  }

  #projeto-detalhe .project-page-aside {
    position: static;
  }
}

@media (max-width: 900px) {
  .auth-gate {
    align-items: start;
    padding: 18px;
  }

  .auth-stage {
    min-height: calc(100vh - 36px);
    grid-template-columns: minmax(0, 1fr);
    border-radius: 22px;
  }

  .auth-story {
    min-height: 230px;
    padding: 32px;
    border-right: 0;
    border-bottom: 1px solid rgba(112, 153, 255, .12);
  }

  .auth-story-copy {
    margin: 38px 0 12px;
  }

  .auth-story-copy h1 {
    max-width: 520px;
    font-size: clamp(38px, 6vw, 48px);
  }

  .auth-story-copy > p:last-child,
  .auth-benefits,
  .auth-story-foot {
    display: none;
  }

  .auth-panel {
    min-height: 480px;
    padding: 40px 32px 46px;
  }

  #projetos .project-form-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --nexo-page-gutter: 16px;
    --nexo-page-top: 26px;
    --nexo-page-bottom: 112px;
    --nexo-page-title-gap: 24px;
  }

  main > header {
    height: 58px;
    padding: 0 16px;
  }

  main > header > span,
  main > header .search {
    display: none;
  }

  main > header > div {
    width: 100%;
    justify-content: flex-end;
  }

  .mobile {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    padding: 6px;
    border-radius: 14px;
  }

  .mobile button {
    min-height: 52px;
    gap: 3px;
    padding: 5px 1px;
    font-size: 9px;
  }

  .mobile button i {
    font-size: 17px;
  }

  .welcome,
  .title,
  .history-head,
  .projects-head,
  #insights .insights-page-title,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .welcome h1,
  .title h1,
  #projetos .projects-head h1,
  #projeto-detalhe .project-hero-copy h2 {
    font-size: clamp(34px, 11vw, 44px);
  }

  .metrics,
  .preview-metrics,
  .summary,
  #insights .ai-metrics,
  #projeto-detalhe .project-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capture,
  .preview,
  .panel,
  .register,
  .privacy,
  .big,
  .tip,
  #projeto-detalhe .project-page > .project-evolution,
  #projeto-detalhe .project-page > .project-timeline,
  #projeto-detalhe .project-recent-panel,
  #projeto-detalhe .project-insights-grid > .project-evolution {
    padding: 22px 18px;
    border-radius: 14px;
  }

  .capture-head,
  .capture-foot,
  .preview-foot,
  #projetos .projects-content > .section-head {
    align-items: stretch;
  }

  .capture-head em {
    display: none;
  }

  .capture-foot,
  .preview-foot {
    flex-direction: column;
  }

  .capture-foot .primary,
  .preview-foot .primary,
  .projects-head-actions,
  #projetos .project-toolbar {
    width: 100%;
  }

  .projects-head-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #projetos .project-toolbar,
  #projetos .project-filters {
    margin-left: 0;
  }

  #projetos .project-filters {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #projetos .project-filters button {
    padding: 0 8px;
  }

  #projetos .project-card-foot {
    align-items: stretch;
    flex-direction: column;
  }

  #projetos .project-card-foot label {
    width: 100%;
  }

  #projeto-detalhe .project-page-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 25px 20px;
  }

  #projeto-detalhe .project-hero-context {
    grid-column: 1;
  }

  #projeto-detalhe .project-documentation-empty,
  #projeto-detalhe .project-rhythm-single {
    grid-template-columns: minmax(0, 1fr);
  }

  #projeto-detalhe .project-documentation-empty > .primary {
    width: 100%;
    min-width: 0;
    grid-column: 1;
    white-space: normal;
  }

  #projeto-detalhe .timeline-entry {
    padding: 18px 16px;
  }

  #projeto-detalhe .timeline-details-body {
    padding: 16px;
  }

  .history-list .entry,
  .entry {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .toast {
    right: 12px;
    bottom: 88px;
    left: 12px;
    max-width: none;
  }

  .project-modal {
    padding: 8px;
  }

  .project-detail {
    width: 100%;
    max-height: calc(100dvh - 16px);
    border-radius: 14px;
  }

  .cloud-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }
}

/* Guided daily capture — clear hierarchy and cohesive interaction flow */
.quick-capture {
  padding: 0;
  border-color: rgba(112, 153, 255, .2);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% -18%, rgba(93, 111, 224, .2), transparent 42%),
    linear-gradient(145deg, rgba(19, 22, 38, .9), rgba(11, 12, 22, .9));
}

.quick-capture::before {
  top: -210px;
  right: -2%;
  width: 600px;
  height: 330px;
  opacity: .7;
}

.quick-capture .capture-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 27px 29px 23px;
}

.capture-heading {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.capture-heading > b {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border: 1px solid rgba(196, 127, 255, .38);
  border-radius: 14px;
  background: radial-gradient(circle at 35% 30%, rgba(196, 127, 255, .38), rgba(90, 127, 255, .09));
  box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 12px 28px rgba(57, 42, 120, .16);
  color: #ddbaff;
  font-size: 19px;
}

.capture-heading > span {
  min-width: 0;
}

.quick-capture .capture-heading small {
  display: block;
  margin-bottom: 5px;
  color: #7fa2ff;
  font: 700 9px var(--font-barlow);
  letter-spacing: .22em;
}

.quick-capture .capture-heading h2 {
  color: #eef1fb;
  font-size: 25px;
  line-height: 1.08;
}

.capture-heading p {
  margin: 7px 0 0;
  color: #818aa8;
  font-size: 11px;
  line-height: 1.5;
}

.quick-capture .capture-ai-status {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 30px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  padding: 0 11px;
  border: 1px solid rgba(196, 127, 255, .22);
  border-radius: 999px;
  background: rgba(196, 127, 255, .065);
  color: #c891fa;
  font: 700 8px var(--font-barlow);
  font-style: normal;
  letter-spacing: .17em;
}

.capture-ai-status > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(63, 209, 184, .65);
}

.quick-capture > form {
  position: relative;
  z-index: 1;
  padding: 0 29px 26px;
}

.capture-prompt {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(159, 171, 224, .12);
  border-radius: 14px;
  background: rgba(4, 5, 12, .38);
  box-shadow: inset 0 1px rgba(255, 255, 255, .018);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.capture-prompt:focus-within {
  border-color: rgba(112, 153, 255, .42);
  background: rgba(6, 8, 16, .52);
  box-shadow: 0 0 0 3px rgba(112, 153, 255, .055);
}

.capture-prompt > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 18px 0;
}

.capture-prompt strong {
  color: #8b96b8;
  font: 600 9px var(--font-barlow);
  letter-spacing: .16em;
}

.capture-prompt > span small {
  color: #626b88;
  font-size: 9px;
}

.quick-capture .capture-prompt textarea {
  min-height: 126px;
  margin: 0;
  padding: 13px 18px 19px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #e3e7f3;
  font-size: 14px;
  line-height: 1.65;
}

.quick-capture .capture-prompt textarea:focus {
  border: 0;
  box-shadow: none;
}

.capture-writing-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 2px 0;
}

.capture-writing-guide > span {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 999px;
  background: rgba(255, 255, 255, .018);
  color: #717b99;
  font-size: 9px;
}

.capture-writing-guide i {
  color: #7199f5;
  font-style: normal;
}

.quick-capture .capture-meta {
  grid-template-columns: minmax(0, 1fr) minmax(210px, .42fr);
  gap: 13px;
  margin-top: 20px;
}

.quick-capture .capture-project,
.quick-capture .capture-duration {
  display: block;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(159, 171, 224, .09);
  border-radius: 13px;
  background: rgba(255, 255, 255, .016);
}

.capture-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.capture-field-head > strong {
  color: #8d97b5;
  font: 600 9px var(--font-barlow);
  letter-spacing: .15em;
}

.capture-field-head > small {
  color: #5e6783;
  font: 400 8px var(--font-outfit);
  letter-spacing: 0;
  text-transform: none;
}

.quick-capture .capture-project .project-picker {
  width: 100%;
  margin: 10px 0 0;
}

.quick-capture .capture-project .project-picker-trigger {
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(4, 5, 12, .46);
  font-size: 11px;
}

.capture-duration-field {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 10px;
}

.quick-capture .capture-duration input {
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 54px 0 14px;
  border-radius: 10px;
  background: rgba(4, 5, 12, .46);
  font-size: 12px;
}

.quick-capture .capture-duration input::-webkit-inner-spin-button,
.quick-capture .capture-duration input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.quick-capture .capture-duration em {
  right: 14px;
  color: #747d99;
  font-size: 9px;
}

.quick-capture .capture-foot {
  align-items: center;
  margin-top: 21px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .055);
}

.capture-trust {
  display: flex;
  align-items: center;
  gap: 11px;
}

.capture-trust > b {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid rgba(63, 209, 184, .13);
  border-radius: 9px;
  background: rgba(63, 209, 184, .04);
  color: var(--green);
  font-size: 13px;
}

.capture-trust > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.capture-trust strong {
  color: #aeb6ce;
  font-size: 10px;
  font-weight: 500;
}

.capture-trust small {
  color: #68718d;
  font-size: 9px;
}

.quick-capture .capture-submit {
  min-width: 220px;
  min-height: 48px;
  justify-content: space-between;
  padding: 0 18px 0 20px;
  border-radius: 12px;
}

.capture-submit > i {
  font-size: 15px;
  font-style: normal;
  transition: transform .18s ease;
}

.capture-submit:hover > i {
  transform: translateX(3px);
}

@media (max-width: 720px) {
  .quick-capture .capture-meta {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .quick-capture {
    border-radius: 18px;
  }

  .quick-capture .capture-head {
    align-items: flex-start;
    padding: 22px 18px 19px;
  }

  .capture-heading {
    align-items: flex-start;
    gap: 13px;
  }

  .capture-heading > b {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 13px;
  }

  .quick-capture .capture-heading h2 {
    font-size: 23px;
  }

  .capture-heading p {
    font-size: 10px;
  }

  .quick-capture .capture-ai-status {
    min-height: 26px;
    margin-top: 2px;
    padding: 0 8px;
    font-size: 0;
  }

  .quick-capture .capture-ai-status::after {
    font: 700 7px var(--font-barlow);
    letter-spacing: .13em;
    content: "IA PRONTA";
  }

  .quick-capture > form {
    padding: 0 18px 21px;
  }

  .capture-prompt > span {
    padding: 14px 15px 0;
  }

  .quick-capture .capture-prompt textarea {
    min-height: 145px;
    padding: 12px 15px 17px;
    font-size: 16px;
  }

  .capture-writing-guide {
    gap: 6px;
  }

  .capture-writing-guide > span {
    padding: 0 8px;
    font-size: 8px;
  }

  .quick-capture .capture-project,
  .quick-capture .capture-duration {
    padding: 13px;
  }

  .quick-capture .capture-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-capture .capture-submit {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 430px) {
  .quick-capture .capture-head {
    gap: 10px;
  }

  .capture-heading p {
    display: none;
  }

  .capture-writing-guide > span {
    flex: 1 1 calc(50% - 6px);
  }

  .capture-writing-guide > span:last-child {
    flex-basis: 100%;
  }
}

/* Current rhythm states and period context */
.score > small em {
  margin-left: 7px;
  padding: 2px 5px;
  border: 1px solid rgba(112, 153, 255, .15);
  border-radius: 5px;
  background: rgba(112, 153, 255, .045);
  color: #7787b8;
  font-size: 7px;
  font-style: normal;
  letter-spacing: .11em;
}

#rhythm-trend {
  white-space: nowrap;
}

#rhythm-trend[data-state="insufficient"] {
  color: #777f9c;
}

#rhythm-trend[data-state="stable"] {
  color: #9aa7cb;
}

#rhythm-trend[data-state="consistent"],
#rhythm-trend[data-state="up"] {
  color: var(--green);
}

#rhythm-trend[data-state="down"] {
  color: var(--gold);
}

/* Readable project narrative and application typography floor */
#projeto-detalhe .project-doc-progress {
  padding-top: 31px;
  padding-bottom: 32px;
}

#projeto-detalhe .project-doc-progress > h4 {
  margin-bottom: 20px;
}

#projeto-detalhe .project-progress-prose {
  max-width: 98ch;
  margin-top: 4px;
}

#projeto-detalhe .project-progress-prose p {
  margin: 0;
  color: #b7bed3;
  font-size: 13px;
  line-height: 1.78;
}

#projeto-detalhe .project-progress-prose p + p {
  margin-top: 16px;
}

#projeto-detalhe .project-progress-prose strong {
  color: #d9e2ff;
  font-weight: 500;
}

#projeto-detalhe .project-progress-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

@media screen {
  .shell :where(small, .eyebrow, time, label, kbd, output),
  .shell :where(
    .chips span,
    .metrics em,
    .focus p,
    .focus p strong,
    .insight p,
    .insight button,
    .recent .section-head > button,
    .entry-date span,
    .entry-body p,
    .project-status,
    .project-picker-title,
    .project-picker-clear,
    .project-evolution-bars i span,
    .timeline-entry > div span,
    .timeline-entry > p,
    .capture-writing-guide > span
  ) {
    font-size: 10px !important;
  }

  .primary.mini,
  .mobile button {
    font-size: 10px;
  }

  .score > small em,
  .quick-capture .capture-ai-status::after {
    font-size: 9px;
  }
}

@media (max-width: 820px) {
  .shell :where(small, .eyebrow, time, label, output),
  .shell :where(
    .chips span,
    .metrics em,
    .focus p,
    .insight p,
    .entry-date span,
    .entry-body p,
    .project-status,
    .project-evolution-bars i span,
    .timeline-entry > div span,
    .timeline-entry > p
  ) {
    font-size: 11px !important;
  }

}

@media (max-width: 560px) {
  #projeto-detalhe .project-doc-progress {
    padding: 25px 20px;
  }

  #projeto-detalhe .project-progress-prose p {
    font-size: 14px;
    line-height: 1.72;
  }

  #projeto-detalhe .project-progress-prose p + p {
    margin-top: 18px;
  }
}

/* Minimal premium top navigation */
main > header.topbar {
  height: 72px;
  margin-right: 0;
  padding: 0;
}

.topbar-inner {
  display: flex;
  width: min(100%, var(--nexo-page-max));
  height: 100%;
  align-items: center;
  justify-content: flex-end;
  margin: 0 auto;
  padding: 0 var(--nexo-page-gutter);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.topbar-primary {
  min-height: 40px;
  padding-inline: 18px;
  border-radius: 12px;
  box-shadow:
    0 9px 24px rgba(70, 104, 212, .22),
    inset 0 1px rgba(255, 255, 255, .16);
}

.topbar-avatar.config-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-color: rgba(159, 171, 224, .14);
  background: rgba(17, 19, 31, .68);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, .18),
    inset 0 0 0 1px rgba(255, 255, 255, .02);
}

.topbar-avatar.config-button:hover {
  border-color: rgba(112, 153, 255, .3);
  background: rgba(112, 153, 255, .08);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, .22),
    0 0 0 3px rgba(112, 153, 255, .045);
}

@media (max-width: 1024px) {
  main > header.topbar {
    height: 64px;
    padding: 0;
  }

}

@media (max-width: 480px) {
  main > header.topbar {
    height: 58px;
    padding: 0;
  }

  .topbar-actions {
    gap: 8px;
  }

  .topbar-primary {
    min-height: 38px;
    padding-inline: 14px;
  }

  .topbar-avatar.config-button {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .auth-gate {
    padding: 0;
  }

  .auth-stage {
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .auth-story {
    min-height: 188px;
    padding: 22px 20px;
  }

  .auth-story-copy {
    margin: 25px 0 0;
  }

  .auth-story-copy h1 {
    margin: 10px 0 0;
    font-size: 34px;
  }

  .auth-panel {
    min-height: 0;
    padding: 30px 20px max(36px, env(safe-area-inset-bottom));
  }

  .auth-panel-head h2 {
    font-size: 31px;
  }

  .auth-tabs {
    margin: 24px 0 20px;
  }

  .auth-form input {
    height: 48px;
    font-size: 16px;
  }

  .auth-trust {
    align-items: flex-start;
  }

  .summary > span {
    min-width: 0;
    padding: 15px 13px;
  }

  .summary strong {
    font-size: 22px;
  }

  #projetos .projects-head-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  #projetos .project-summary,
  #projetos .projects-head-actions > .primary {
    width: 100%;
  }

  #projetos .project-form-actions > div {
    grid-template-columns: minmax(0, 1fr);
  }

  #projeto-detalhe .project-detail-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  #projeto-detalhe .project-detail-metrics > span + span {
    border-top: 1px solid rgba(255, 255, 255, .055);
    border-left: 0;
  }
}

/* Keep the account shortcut circular after generic button rules. */
.profile-shortcut.config-button {
  overflow: hidden;
  padding: 0;
  border-radius: 50%;
}

/* Mobile form focus and floating navigation dock */
@media (max-width: 640px) {
  :root {
    --nexo-page-bottom: 138px;
  }

  :where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
    textarea,
    select
  ) {
    font-size: 16px !important;
  }

  .mobile {
    right: auto;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    width: min(430px, calc(100% - 28px));
    min-height: 76px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 7px;
    overflow: hidden;
    border-color: rgba(159, 171, 224, .17);
    border-radius: 30px;
    background:
      linear-gradient(145deg, rgba(25, 28, 43, .95), rgba(12, 14, 24, .96));
    box-shadow:
      0 20px 55px rgba(0, 0, 0, .52),
      0 0 0 1px rgba(255, 255, 255, .025) inset,
      0 10px 34px rgba(68, 43, 140, .12);
    transform: translateX(-50%);
  }

  .mobile button {
    min-height: 60px;
    gap: 5px;
    padding: 7px 2px 6px;
    border-radius: 22px;
    font-size: 9px;
    transition: color .18s ease, background .18s ease, box-shadow .18s ease;
  }

  .mobile button i {
    font-size: 19px;
  }

  .mobile button.active {
    background:
      linear-gradient(145deg, rgba(112, 153, 255, .19), rgba(112, 153, 255, .08));
    box-shadow:
      0 8px 22px rgba(0, 0, 0, .2),
      inset 0 0 0 1px rgba(112, 153, 255, .08);
    color: #8fb0ff;
  }
}

/* Final responsive type safeguards must stay after component media rules. */
@media screen {
  .score > small em,
  .quick-capture .capture-ai-status::after {
    font-size: 10px !important;
  }
}

@media (max-width: 820px) {
  .mobile button,
  .score > small em,
  .quick-capture .capture-ai-status::after {
    font-size: 11px !important;
  }
}
/* Project identity editor */
#projeto-detalhe .project-edit-panel {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(112, 153, 255, .22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(112, 153, 255, .11), transparent 34%),
    linear-gradient(145deg, rgba(18, 21, 36, .96), rgba(10, 11, 20, .96));
  box-shadow: 0 18px 48px rgba(0, 0, 0, .18);
}

#projeto-detalhe .project-edit-heading,
#projeto-detalhe .project-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

#projeto-detalhe .project-edit-heading {
  margin-bottom: 20px;
}

#projeto-detalhe .project-edit-heading h3 {
  margin: 4px 0 0;
  color: #f3f5ff;
  font: 500 23px/1.15 var(--font-barlow);
}

#projeto-detalhe .project-edit-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(7, 8, 15, .6);
  color: #aeb6cf;
  font-size: 20px;
}

#projeto-detalhe .project-edit-grid {
  display: grid;
  grid-template-columns: minmax(220px, .5fr) minmax(0, 1.5fr);
  gap: 18px;
}

#projeto-detalhe .project-edit-logo-field {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 108px;
  padding: 16px;
  border: 1px dashed rgba(112, 153, 255, .28);
  border-radius: 14px;
  background: rgba(5, 7, 15, .42);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}

#projeto-detalhe .project-edit-logo-field:hover {
  border-color: rgba(112, 153, 255, .58);
  background: rgba(112, 153, 255, .07);
}

#projeto-detalhe .project-edit-logo-field > span:nth-child(2) {
  display: grid;
  gap: 5px;
  min-width: 0;
}

#projeto-detalhe .project-edit-logo-field strong {
  color: #e8ebf7;
  font-size: 13px;
  font-weight: 600;
}

#projeto-detalhe .project-edit-logo-field small,
#projeto-detalhe .project-edit-actions > small {
  color: #7d87a5;
  font-size: 11px;
  line-height: 1.45;
}

#projeto-detalhe .project-edit-logo-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#projeto-detalhe .project-edit-logo-preview {
  display: grid;
  overflow: hidden;
  width: 70px;
  height: 70px;
  flex: 0 0 70px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: rgba(8, 10, 19, .8);
  color: var(--project-color);
  font: 600 28px var(--font-barlow);
}

#projeto-detalhe .project-edit-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#projeto-detalhe .project-edit-logo-preview.is-loading {
  animation: logo-pulse .8s ease-in-out infinite alternate;
}

#projeto-detalhe .project-edit-fields {
  display: grid;
  gap: 14px;
}

#projeto-detalhe .project-edit-fields label {
  display: grid;
  gap: 7px;
}

#projeto-detalhe .project-edit-fields label > span {
  color: #8390b3;
  font: 600 10px var(--font-barlow);
  letter-spacing: .12em;
}

#projeto-detalhe .project-edit-description-head {
  display: flex;
  justify-content: space-between;
}

#projeto-detalhe .project-edit-description-head output {
  color: #66718e;
  font: 500 11px var(--font-sans);
  letter-spacing: 0;
}

#projeto-detalhe .project-edit-fields input,
#projeto-detalhe .project-edit-fields textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 11px;
  outline: none;
  background: rgba(5, 7, 15, .62);
  color: #eef1fb;
  font: 500 16px/1.45 var(--font-sans);
  transition: border-color .2s ease, box-shadow .2s ease;
}

#projeto-detalhe .project-edit-fields input {
  min-height: 46px;
  padding: 0 14px;
}

#projeto-detalhe .project-edit-fields textarea {
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
}

#projeto-detalhe .project-edit-fields input:focus,
#projeto-detalhe .project-edit-fields textarea:focus {
  border-color: rgba(112, 153, 255, .7);
  box-shadow: 0 0 0 3px rgba(112, 153, 255, .1);
}

#projeto-detalhe .project-edit-actions {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .065);
}

#projeto-detalhe .project-edit-actions > span {
  display: flex;
  gap: 10px;
}

@media (max-width: 760px) {
  #projeto-detalhe .project-page-nav,
  #projeto-detalhe .project-page-nav > div {
    align-items: stretch;
    flex-direction: column;
  }

  #projeto-detalhe .project-page-nav > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #projeto-detalhe .project-page-nav > div > button:first-child {
    grid-column: 1 / -1;
  }

  #projeto-detalhe .project-edit-panel {
    padding: 19px;
  }

  #projeto-detalhe .project-edit-grid {
    grid-template-columns: 1fr;
  }

  #projeto-detalhe .project-edit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #projeto-detalhe .project-edit-actions > span,
  #projeto-detalhe .project-edit-actions button {
    width: 100%;
  }
}

@media print {
  .printing-project #projeto-detalhe .project-edit-panel,
  .printing-project #projeto-detalhe [data-edit-project] {
    display: none !important;
  }
}
