:root {
  color-scheme: dark;
  --bg: #090c10;
  --rail: #0d1117;
  --sidebar: #111820;
  --sidebar-2: #0f151c;
  --surface: #151d26;
  --surface-2: #1a2430;
  --surface-3: #202b38;
  --text: #edf3f8;
  --muted: #9aa8b5;
  --subtle: #71808f;
  --border: #293644;
  --border-soft: rgba(126, 144, 163, .18);
  --accent: #45c7b5;
  --accent-strong: #60d6c6;
  --accent-blue: #5aa7ff;
  --accent-amber: #f2b55b;
  --danger: #ff6b6b;
  --success: #76d88a;
  --focus: #8cc8ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;
  --font: "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scrollbar-color: #435365 #0b1016;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #0b1016;
}

::-webkit-scrollbar-thumb {
  border: 3px solid #0b1016;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #4b5b6c, #2f3d4c);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #627487, #405064);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(115deg, rgba(69, 199, 181, .08), transparent 28rem),
    linear-gradient(180deg, #0b1016 0%, #080b0f 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
}

body.public {
  background: #040711;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.material-symbols-rounded {
  display: inline-flex;
  width: 1.2em;
  min-width: 1.2em;
  align-items: center;
  justify-content: center;
  font-family: "Material Symbols Rounded";
  font-size: 1.25rem;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

input,
select,
textarea,
button {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #0b1118;
  color: var(--text);
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: .72rem .82rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #405267;
  background: #0e151e;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(90, 167, 255, .18);
  outline: 0;
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
}

select {
  appearance: none;
  padding-right: 2.5rem;
}

button,
.primary,
.oauth {
  display: inline-flex;
  width: auto;
  min-height: 2.35rem;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border-radius: var(--radius-pill);
  padding: .5rem .9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, border-color .12s ease, background .12s ease, color .12s ease;
}

button:hover,
.oauth:hover {
  border-color: #4b5f74;
  background: #223040;
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.primary {
  border-color: rgba(69, 199, 181, .85);
  background: linear-gradient(180deg, #68d9ca, #3ab5a4);
  color: #041211;
  font-weight: 700;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 3.5rem 17rem minmax(0, 1fr);
}

.activity-rail {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  height: 100vh;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid #1f2a35;
  background: var(--rail);
  padding: .65rem .45rem;
}

.rail-brand,
.rail-icon,
.icon-only,
.icon-button {
  position: relative;
  display: inline-grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
}

.rail-brand {
  margin-bottom: .9rem;
  background: linear-gradient(135deg, #60d6c6, #5aa7ff);
  color: #051113;
  font-size: .75rem;
  font-weight: 900;
}

.rail-nav {
  display: grid;
  gap: .25rem;
}

.rail-icon:hover,
.rail-icon[aria-current="page"],
.icon-only:hover,
.icon-button:hover {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.icon-button {
  display: inline-flex;
  width: auto;
  min-width: 2.45rem;
  gap: .4rem;
  padding: 0 .7rem;
}

.rail-icon[aria-current="page"]::before {
  position: absolute;
  left: -.47rem;
  width: 3px;
  height: 1.35rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  content: "";
}

.bottom {
  margin-top: auto;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 7;
  display: flex;
  height: 100vh;
  min-width: 0;
  flex-direction: column;
  overflow: auto;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  padding: 1rem .8rem;
}

.brand {
  display: block;
  margin: .25rem .35rem 1rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.workspace-nav,
.subnav {
  display: grid;
  gap: .25rem;
}

.workspace-nav a,
.subnav a {
  display: flex;
  min-height: 2.35rem;
  align-items: center;
  gap: .65rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  padding: .52rem .65rem;
  text-decoration: none;
}

.workspace-nav a:hover,
.subnav a:hover,
.workspace-nav a[aria-current="page"] {
  background: rgba(90, 167, 255, .12);
  color: var(--text);
}

.workspace-nav a[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--accent-blue);
}

.sidebar-footer {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--border-soft);
  padding: .85rem .35rem .15rem;
  color: var(--subtle);
  font-size: .78rem;
}

.system-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(118, 216, 138, .12);
}

.workspace {
  min-width: 0;
  width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  gap: .85rem;
  align-items: center;
  min-height: 4rem;
  border-bottom: 1px solid rgba(41, 54, 68, .8);
  background: rgba(10, 14, 20, .86);
  backdrop-filter: blur(16px);
  padding: .72rem 1rem;
}

.command-bar {
  display: flex;
  flex: 1;
  align-items: center;
  gap: .5rem;
  max-width: 46rem;
  border: 1px solid #253343;
  border-radius: var(--radius-pill);
  background: #0d141c;
  padding: 0 .75rem;
}

.command-bar input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.command-bar input:focus {
  box-shadow: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: .55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: #0d141c;
  padding: .25rem .65rem .25rem .28rem;
  text-decoration: none;
}

.profile-chip strong,
.profile-chip small {
  display: block;
  line-height: 1.15;
}

.profile-chip small {
  color: var(--muted);
  font-size: .72rem;
}

main {
  width: 100%;
  margin: 0;
  padding: 1.15rem;
}

.guest {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1rem;
}

.guest main {
  width: min(100%, 34rem);
}

.auth-card,
.panel,
.hero,
.watch,
.public-share {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(21, 29, 38, .94), rgba(16, 23, 31, .94));
  box-shadow: var(--shadow);
}

.auth-card,
.panel,
.watch,
.public-share {
  padding: 1rem;
}

.auth-card {
  display: grid;
  gap: 1rem;
}

.auth-card .primary,
.auth-card .oauth {
  width: 100%;
}

.auth-card .oauth {
  border-color: #324255;
  background: #0d141c;
  color: var(--text);
}

.auth-card > a:not(.oauth) {
  color: var(--accent-strong);
  font-size: .86rem;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
}

.auth-links a {
  color: var(--accent-strong);
  font-size: .86rem;
}

.policy-page {
  width: min(100%, 54rem);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(21, 29, 38, .96), rgba(13, 20, 28, .96));
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 4vw, 2.25rem);
}

.policy-page header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 1rem;
}

.policy-brand {
  display: inline-flex;
  margin-bottom: .85rem;
  color: var(--accent-strong);
  font-weight: 850;
  text-decoration: none;
}

.policy-page h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
}

.policy-page h2 {
  margin: 1.35rem 0 .35rem;
  color: var(--text);
  font-size: 1.05rem;
}

.policy-page p {
  color: #c8d3de;
}

.policy-page footer {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.75rem;
  border-top: 1px solid var(--border-soft);
  padding-top: 1rem;
}

.policy-page footer a {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  padding: .5rem .85rem;
  text-decoration: none;
}

.public-home {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  max-width: 100vw;
  min-height: 92svh;
  overflow: hidden;
  background: #040711;
}

.public-home::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 7, 17, .95) 0%, rgba(4, 7, 17, .74) 42%, rgba(4, 7, 17, .18) 100%),
    linear-gradient(180deg, rgba(4, 7, 17, .08), rgba(4, 7, 17, .78));
  content: "";
  pointer-events: none;
}

.public-home-bg {
  position: absolute;
  inset: 0;
}

.public-home-art {
  position: absolute;
  user-select: none;
  pointer-events: none;
}

.generated-art {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art-collective {
  right: -7vw;
  bottom: -9vw;
  width: min(46rem, 58vw);
  opacity: .32;
  filter: saturate(1.15);
}

.art-anchor {
  right: 12vw;
  top: 8vh;
  width: min(28rem, 34vw);
  opacity: .16;
  mix-blend-mode: screen;
}

.art-vizmatic {
  right: 3vw;
  top: 34vh;
  width: min(24rem, 30vw);
  opacity: .2;
  mix-blend-mode: screen;
}

.public-home-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: clamp(5.75rem, 9vw, 8.5rem);
  padding: clamp(1rem, 2.4vw, 2rem) clamp(1rem, 3vw, 2.5rem);
}

.public-home-brand {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 1.4vw, 1.35rem);
}

.public-home-brand {
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
}

.public-home-brand img {
  width: clamp(3.3rem, 5.5vw, 5.4rem);
  height: clamp(3.3rem, 5.5vw, 5.4rem);
}

.public-home-brand .brand-name {
  display: inline-flex;
  align-items: baseline;
  font-size: clamp(1.85rem, 3vw, 3.2rem);
  font-weight: 790;
  letter-spacing: -.047em;
  line-height: 1;
  white-space: nowrap;
}

.public-home-brand .brand-sorry {
  color: #ff5bc2;
}

.public-home-brand .brand-need {
  color: var(--text);
}

.public-home-brand .brand-boost {
  color: #6df1ff;
}

.public-user-pill {
  --public-pill-width: clamp(8.4rem, 12vw, 10rem);
  display: grid;
  width: min(var(--public-pill-width), 40vw);
  max-width: calc(var(--public-pill-width) * 2);
  min-height: clamp(3.9rem, 6.4vw, 5.4rem);
  grid-template-rows: 1fr 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(109, 241, 255, .36);
  border-radius: 3px;
  background: rgba(5, 10, 18, .5);
  color: var(--text);
  text-decoration: none;
  backdrop-filter: blur(14px);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease;
}

.public-user-pill.is-known {
  width: fit-content;
  min-width: var(--public-pill-width);
}

.public-user-pill:hover,
.public-user-pill:focus-visible {
  border-color: rgba(255, 91, 194, .8);
  background: rgba(8, 14, 24, .72);
  box-shadow: 0 0 0 1px rgba(109, 241, 255, .34), 0 0 28px rgba(255, 0, 255, .28);
  transform: translateY(-1px);
}

.public-user-visual {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: .5rem .85rem .35rem;
}

.public-user-visual img {
  width: clamp(2.2rem, 4vw, 3.3rem);
  height: clamp(2.2rem, 4vw, 3.3rem);
  border-radius: 50%;
  object-fit: cover;
}

.public-user-visual .material-symbols-rounded {
  color: var(--accent-strong);
  font-size: clamp(2.15rem, 4vw, 3.2rem);
}

.public-user-label {
  display: block;
  min-width: 0;
  max-width: calc(var(--public-pill-width) * 2);
  overflow: hidden;
  border-top: 1px solid rgba(237, 243, 248, .18);
  color: #dce7f2;
  font-size: clamp(.62rem, .86vw, .78rem);
  font-weight: 780;
  line-height: 1.25rem;
  padding: 0 .5rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-home-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  width: min(100%, 64rem);
  margin: 0;
  padding: clamp(1.25rem, 5vw, 4rem) clamp(1.25rem, 5vw, 4rem) clamp(6.5rem, 11vh, 9rem);
}

.public-home-copy h1 {
  max-width: 48rem;
  margin: 0 0 1rem;
  font-size: clamp(3.2rem, 8.5vw, 7rem);
  line-height: .95;
}

.public-home-copy h1 span {
  display: block;
}

.public-home-copy h1 span:first-child {
  color: var(--accent-strong);
  font-size: .72em;
}

.public-home-copy h1 span:last-child {
  color: var(--text);
}

.public-home-copy p {
  max-width: 44rem;
  color: #ff3fe0;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  text-shadow: 0 0 22px rgba(255, 0, 255, .18);
}

.public-home-actions {
  position: absolute;
  right: 0;
  bottom: clamp(1.8rem, 5.6vh, 4.4rem);
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  pointer-events: none;
}

.public-home-actions .primary {
  min-width: min(22rem, calc(100vw - 2rem));
  min-height: clamp(3.15rem, 5vw, 4.25rem);
  justify-content: center;
  border-color: rgba(109, 241, 255, .64);
  background: linear-gradient(135deg, rgba(109, 241, 255, .22), rgba(255, 0, 255, .18)), rgba(7, 13, 22, .8);
  color: var(--text);
  font-size: clamp(1.05rem, 1.45vw, 1.35rem);
  box-shadow: 0 0 0 1px rgba(255, 91, 194, .2), 0 0 34px rgba(109, 241, 255, .18);
  pointer-events: auto;
}

.public-home-actions .primary:hover,
.public-home-actions .primary:focus-visible {
  border-color: rgba(255, 91, 194, .86);
  box-shadow: 0 0 0 1px rgba(109, 241, 255, .44), 0 0 42px rgba(255, 0, 255, .26);
}

.hero-project-matrix {
  display: grid;
  width: min(40rem, 58vw);
  grid-template-columns: repeat(2, minmax(0, 2fr));
  gap: .52rem;
  margin: 0 0 clamp(1.2rem, 2.2vw, 2rem);
  grid-auto-flow: row;
  align-content: stretch;
  justify-content: center;
  align-items: baseline;
  justify-items: stretch;
}

.hero-project-card {
  display: grid;
  grid-template-columns: 0.7rem minmax(0, 1fr);
  min-width: 0;
  align-items: START;
  gap: .1rem;
  border: 1px solid rgba(109, 241, 255, .36);
  overflow: hidden;
  border: 1px solid rgba(109, 241, 255, .26);
  border-radius: 8px;
  background: rgba(5, 10, 18, .58);
  box-shadow: 12px 15px 8px 0px rgba(255, 91, 194, .08);
  color: #b3d7d6;
  padding: .38rem .48rem;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.hero-project-card:hover,
.hero-project-card:focus-visible {
  border-color: rgba(255, 91, 194, .76);
  box-shadow: 0 0 0 1px rgba(109, 241, 255, .36), 0 0 22px rgba(255, 0, 255, .2);
}

.hero-project-card img {
  width: 20rem;
  height: 5rem;
  border-radius: 5px;
  object-fit: cover;
}

.hero-project-card span {
  min-width: 0;
  overflow: hidden;
  font-size: 1.6rem;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align:  left;
}

.project-gallery {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 15% 10%, rgba(96, 214, 198, .13), transparent 30rem),
    radial-gradient(circle at 86% 20%, rgba(255, 86, 217, .12), transparent 28rem),
    #060a12;
}

.project-gallery-head {
  max-width: 56rem;
  margin-bottom: 1.2rem;
}

.project-gallery-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.project-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(96, 214, 198, .34);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 25, 35, .94), rgba(8, 13, 20, .96));
  box-shadow: 0 0 0 1px rgba(255, 86, 217, .14), 0 20px 55px rgba(0, 0, 0, .35);
  text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: rgba(255, 86, 217, .74);
  box-shadow: 0 0 0 1px rgba(96, 214, 198, .46), 0 0 30px rgba(255, 86, 217, .26), 0 22px 58px rgba(0, 0, 0, .44);
  transform: translateY(-2px);
}

.project-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid rgba(237, 243, 248, .1);
  background: #09111c;
}

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

.project-body {
  display: grid;
  gap: .42rem;
  padding: .95rem;
}

.project-body strong {
  font-size: 1.1rem;
}

.project-body > span:last-child {
  color: #c8d4df;
}

.project-label {
  color: var(--accent-strong);
  font-size: .74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.public-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(237, 243, 248, .1);
  background: #050811;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  color: var(--muted);
}

.public-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
}

.public-footer a {
  color: var(--text);
  text-decoration: none;
}

.hero {
  display: grid;
  min-height: 15rem;
  align-items: end;
  margin-bottom: 1rem;
  overflow: hidden;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  background:
    linear-gradient(90deg, rgba(11, 16, 22, .94), rgba(11, 16, 22, .68)),
    linear-gradient(135deg, rgba(69, 199, 181, .2), transparent 40%),
    #111a23;
}

.hero h1 {
  max-width: 58rem;
  margin: .2rem 0;
  font-size: clamp(2rem, 3.6vw, 3.7rem);
  line-height: 1.04;
}

.hero p {
  max-width: 48rem;
}

.eyebrow {
  margin: 0 0 .25rem;
  color: var(--accent);
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.notice,
.warning {
  margin-bottom: 1rem;
  border: 1px solid rgba(69, 199, 181, .35);
  border-radius: var(--radius);
  background: rgba(69, 199, 181, .1);
  padding: .75rem 1rem;
}

.warning {
  border-color: rgba(242, 181, 91, .42);
  background: rgba(242, 181, 91, .12);
}

.metrics,
.grid,
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
  margin-bottom: 1rem;
}

.metrics div,
.stat-strip div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(20, 28, 37, .85);
  padding: .9rem;
}

.metrics strong,
.stat-strip span {
  display: block;
  color: var(--accent-amber);
  font-size: 1.75rem;
  font-weight: 750;
}

.metrics span,
small,
.muted {
  color: var(--muted);
}

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

.panel {
  margin-bottom: 1rem;
}

.panel-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.panel-header h1,
.panel-header h2 {
  margin: 0;
}

.panel-header p {
  margin: .2rem 0 0;
  color: var(--muted);
}

.panel-header.compact {
  align-items: center;
}

.narrow {
  max-width: 44rem;
}

.feed,
.mini-list,
.agenda,
.stack,
.audit-feed {
  display: grid;
  gap: .75rem;
}

.feed article,
.mini-list article,
.agenda article,
.video-grid article,
.person,
.audit-feed article {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(8, 12, 17, .42);
  padding: .9rem;
}

.feed h2,
.video-grid h2 {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.form-grid .span,
.span {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: .35rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
}

.control-wrap,
.select-wrap,
.password-wrap {
  position: relative;
  display: block;
}

.select-wrap .material-symbols-rounded {
  position: absolute;
  top: 50%;
  right: .65rem;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.password-wrap input {
  padding-right: 3.3rem;
}

.password-wrap button {
  position: absolute;
  top: .32rem;
  right: .32rem;
  width: 2.15rem;
  height: 2.15rem;
  min-height: 0;
  padding: 0;
}

.toolbar,
.inline,
.actions,
.share-form {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: end;
}

.toolbar input,
.inline input,
.inline select,
.share-form input {
  width: auto;
  min-width: 9rem;
  flex: 1 1 12rem;
}

.inline .select-wrap {
  flex: 1 1 11rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
  gap: 1rem;
}

.people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: .9rem;
}

.person {
  display: grid;
  align-content: start;
  gap: .85rem;
  min-height: 11rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(32, 43, 56, .56), rgba(12, 18, 25, .64));
  padding: .95rem;
}

.person-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .8rem;
  align-items: center;
}

.person-head strong,
.person-head span,
.person-email span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-head strong {
  display: block;
  font-size: 1.02rem;
}

.person-head span {
  display: block;
  color: var(--muted);
}

.person-meta {
  display: grid;
  gap: .35rem;
}

.person-meta small,
.person-email {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: .45rem;
  color: var(--muted);
}

.person-meta small .material-symbols-rounded,
.person-email .material-symbols-rounded {
  color: var(--subtle);
  font-size: 1rem;
}

.person-meta .redacted {
  color: #d6c28e;
}

.person-meta .redacted .material-symbols-rounded {
  color: var(--accent-amber);
}

.person-email {
  color: var(--accent-strong);
  text-decoration: none;
}

.account-ref {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: .35rem;
  vertical-align: middle;
}

.account-ref > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-ref-button {
  display: inline-grid;
  width: 1.65rem;
  height: 1.65rem;
  min-height: 0;
  place-items: center;
  border: 1px solid rgba(96, 214, 198, .24);
  border-radius: var(--radius-pill);
  background: rgba(69, 199, 181, .08);
  color: var(--accent-strong);
  padding: 0;
}

.account-ref-button .material-symbols-rounded {
  font-size: 1rem;
}

.admin-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem);
  gap: 1rem;
  align-items: start;
}

.admin-primary {
  min-width: 0;
}

.admin-side {
  position: sticky;
  top: 5rem;
  min-width: 0;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: .9rem;
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0b1118;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--border-soft);
  padding: .68rem .75rem;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111923;
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
}

.data-grid tr:hover td {
  background: rgba(90, 167, 255, .06);
}

.user-cell {
  display: flex;
  gap: .65rem;
  align-items: center;
}

.user-cell strong,
.user-cell small {
  display: block;
}

.row-actions {
  flex-wrap: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: #101822;
  color: var(--muted);
  padding: .2rem .55rem;
  font-size: .72rem;
  font-weight: 750;
}

.status-pill.role {
  color: var(--accent-blue);
}

.state-active {
  color: var(--success);
}

.state-suspended,
.state-disabled {
  color: var(--danger);
}

.state-invited {
  color: var(--accent-amber);
}

.audit-feed {
  max-height: 28rem;
  overflow: auto;
  padding-right: .2rem;
}

.audit-feed article {
  display: grid;
  gap: .15rem;
}

.recipient-picker {
  position: relative;
  display: none;
}

.js .recipient-picker {
  display: block;
}

.recipient-selected,
.recipient-menu button {
  width: 100%;
  justify-content: flex-start;
}

.recipient-selected {
  justify-content: space-between;
}

.recipient-menu {
  position: absolute;
  z-index: 9;
  top: calc(100% + .35rem);
  left: 0;
  display: grid;
  width: 100%;
  max-height: 18rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #0c1219;
  box-shadow: var(--shadow);
  padding: .35rem;
}

.recipient-menu button {
  min-height: 2.65rem;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
}

.recipient-menu small {
  margin-left: auto;
}

.js .native-recipient-fallback {
  display: none;
}

pre {
  max-height: 16rem;
  overflow: auto;
  border-radius: var(--radius-sm);
  background: #090d13;
  padding: .75rem;
}

.thumb {
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #101822, #15342f);
  color: var(--accent);
  font-weight: 900;
}

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

.thumb .material-symbols-rounded {
  font-size: 3rem;
}

.tube-upload-form {
  margin-bottom: 1rem;
}

.sr-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.tube-dropzone {
  display: grid;
  width: 100%;
  min-height: 11rem;
  place-items: center;
  border: 1px dashed rgba(96, 214, 198, .55);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(69, 199, 181, .12), transparent 45%),
    rgba(8, 12, 17, .56);
  color: var(--text);
  text-align: center;
}

.tube-dropzone.drag-over,
.tube-dropzone:hover {
  border-color: rgba(255, 86, 217, .78);
  box-shadow: 0 0 0 1px rgba(96, 214, 198, .32), 0 0 32px rgba(255, 86, 217, .22);
}

.tube-dropzone .material-symbols-rounded {
  color: var(--accent-strong);
  font-size: 2.8rem;
}

.tube-dropzone span {
  color: var(--muted);
}

.tag-line {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(2, 5, 9, .72);
  padding: 1rem;
  backdrop-filter: blur(10px);
}

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

.modal-card {
  width: min(100%, 44rem);
  max-height: min(90vh, 52rem);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(21, 29, 38, .98), rgba(10, 16, 23, .98));
  box-shadow: var(--shadow);
  padding: 1rem;
}

.video-thumb-preview {
  display: grid;
  min-height: 10rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: #090d13;
}

.video-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-progress {
  display: grid;
  gap: .45rem;
}

.upload-progress div {
  display: flex;
  justify-content: space-between;
}

.upload-progress progress {
  width: 100%;
  accent-color: var(--accent-strong);
}

.account-profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.account-profile-head h3 {
  margin: 0;
}

.account-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin: 0 0 1rem;
}

.account-fields div {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: .65rem;
}

.account-fields dt {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 750;
  text-transform: uppercase;
}

.account-fields dd {
  margin: .15rem 0 0;
}

.account-activity {
  display: grid;
  gap: .85rem;
}

.account-activity header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.account-activity h4 {
  margin: 0;
}

video {
  width: 100%;
  max-height: 70vh;
  border-radius: var(--radius);
  background: #000;
}

.check {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.check input {
  width: auto;
}

.avatar,
.avatar-sm,
.avatar-xl {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(96, 214, 198, .34);
  border-radius: 50%;
  background: linear-gradient(135deg, #1b3b42, #14202a);
  color: var(--text);
  font-size: .78rem;
  font-weight: 850;
}

.avatar {
  width: 2rem;
  height: 2rem;
}

.avatar-sm {
  width: 2.1rem;
  height: 2.1rem;
}

.avatar-xl {
  width: 5rem;
  height: 5rem;
  font-size: 1.25rem;
}

.avatar img,
.avatar-sm img,
.avatar-xl img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[data-tooltip]::after {
  position: absolute;
  z-index: 50;
  bottom: calc(100% + .45rem);
  left: 50%;
  max-width: 16rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #111923;
  color: var(--text);
  content: attr(data-tooltip);
  font-size: .75rem;
  opacity: 0;
  padding: .3rem .5rem;
  pointer-events: none;
  transform: translate(-50%, .2rem);
  transition: opacity .12s ease, transform .12s ease;
  white-space: nowrap;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 3.5rem minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    left: 3.5rem;
    transform: translateX(-110%);
    transition: transform .16s ease;
  }

  body.shell-open .sidebar {
    transform: translateX(0);
  }

  .admin-workbench,
  .metrics,
  .grid,
  .people,
  .video-grid,
  .split,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-side {
    position: static;
  }

  .profile-chip span {
    display: none;
  }
}

@media (min-width: 980px) {
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .public-home {
    min-height: 100svh;
  }

  .public-home::after {
    background:
      linear-gradient(180deg, rgba(4, 7, 17, .9) 0%, rgba(4, 7, 17, .72) 48%, rgba(4, 7, 17, .95) 100%),
      linear-gradient(90deg, rgba(4, 7, 17, .7), rgba(4, 7, 17, .22));
  }

  .public-home-nav {
    align-items: center;
    box-sizing: border-box;
    min-height: 5.2rem;
    padding: .9rem 1rem;
  }

  .public-home-brand {
    max-width: calc(100% - 7.5rem);
  }

  .public-home-brand img {
    width: 2.7rem;
    height: 2.7rem;
  }

  .public-home-brand .brand-name {
    font-size: 1.35rem;
  }

  .public-user-pill {
    --public-pill-width: 6.7rem;
    width: 6.7rem;
    min-height: 3.5rem;
    grid-template-rows: 1fr 1.05rem;
  }

  .public-user-label {
    font-size: .58rem;
    line-height: 1.05rem;
  }

  .public-home-copy {
    align-self: end;
    padding: 2rem 1.1rem 5.9rem;
  }

  .public-home-copy h1 {
    max-width: 100%;
    font-size: 2.75rem;
    overflow-wrap: normal;
  }

  .public-home-copy h1 span:first-child {
    font-size: .78em;
  }

  .public-home-copy p {
    font-size: 1.02rem;
  }

  .hero-project-matrix {
    display: grid;
    width: calc(100vw - 2.2rem);
    grid-auto-flow: column;
    grid-auto-columns: minmax(9.25rem, 42vw);
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: .35rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .hero-project-card {
    grid-template-columns: 2.3rem minmax(0, 1fr);
    scroll-snap-align: start;
  }

  .hero-project-card img {
    width: 2.3rem;
    height: 2.3rem;
  }

  .public-home-actions {
    bottom: 1.25rem;
    padding: 0 1.1rem;
  }

  .public-home-actions .primary {
    width: 100%;
    min-width: 0;
    min-height: 3.1rem;
    font-size: 1.05rem;
  }

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

  .account-fields {
    grid-template-columns: 1fr;
  }

  .generated-art {
    object-position: 66% center;
  }

  .art-collective,
  .art-anchor,
  .art-vizmatic {
    opacity: .14;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .activity-rail {
    position: fixed;
    bottom: 0;
    top: auto;
    z-index: 10;
    width: 100%;
    height: 3.55rem;
    flex-direction: row;
    justify-content: space-around;
    border-right: 0;
    border-top: 1px solid var(--border);
  }

  .rail-brand,
  .rail-icon.bottom {
    display: none;
  }

  .rail-nav {
    display: flex;
    width: 100%;
    justify-content: space-around;
  }

  .sidebar {
    left: 0;
    width: min(86vw, 19rem);
  }

  .topbar {
    gap: .5rem;
    padding: .55rem;
  }

  main {
    padding: .8rem .8rem 4.5rem;
  }

  .topbar-actions .icon-only:first-child {
    display: none;
  }

  .row-actions {
    flex-wrap: wrap;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .public-home-copy h1 {
    font-size: 2.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
