/*
 * Yanmai Human Intelligence Studio
 * Unified creative operating system for desktop, tablet and mobile.
 */

:root {
  color-scheme: dark;
  --studio-bg: #0b0f12;
  --studio-bg-soft: #10161a;
  --studio-surface: #151b20;
  --studio-surface-raised: #1a2228;
  --studio-surface-quiet: #11171b;
  --studio-line: #2a343b;
  --studio-line-soft: #20292f;
  --studio-text: #f4f6f3;
  --studio-text-soft: #c2cbc9;
  --studio-muted: #879492;
  --studio-teal: #18c7a3;
  --studio-teal-dark: #0fa384;
  --studio-blue: #4aa8ff;
  --studio-coral: #ff765d;
  --studio-amber: #f2c94c;
  --studio-danger: #ef6464;
  --studio-sidebar: #0e1317;
  --studio-shadow: 0 20px 54px rgba(0, 0, 0, 0.26);
  --radius: 8px;
  --ink: var(--studio-text);
  --ink-2: var(--studio-text-soft);
  --muted: var(--studio-muted);
  --paper: var(--studio-surface);
  --paper-2: var(--studio-surface-raised);
  --paper-ink: var(--studio-text);
  --paper-muted: var(--studio-muted);
  --line: var(--studio-line);
  --line-dark: var(--studio-line);
  --lime: var(--studio-teal);
  --mint: var(--studio-teal);
  --cyan: var(--studio-blue);
  --blue: var(--studio-blue);
  --amber: var(--studio-amber);
  --coral: var(--studio-coral);
  --red: var(--studio-danger);
  --shadow: var(--studio-shadow);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.2);
}

html {
  background: var(--studio-bg);
}

body {
  color: var(--studio-text);
  background: var(--studio-bg);
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  display: none;
}

::selection {
  color: #07110e;
  background: rgba(24, 199, 163, 0.82);
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--studio-teal);
  outline-offset: 2px;
}

.shell {
  grid-template-columns: 224px minmax(0, 1fr);
  background: var(--studio-bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  gap: 24px;
  padding: 20px 14px 16px;
  border-right: 1px solid var(--studio-line-soft);
  background: var(--studio-sidebar);
  box-shadow: none;
}

.brand {
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 12px;
  min-width: 0;
  padding: 0 5px 12px;
  text-align: left;
}

.brand-mark {
  width: 54px;
  height: 46px;
  padding: 3px;
  border: 1px solid #245b68;
  border-radius: 8px;
  background: #071116;
  box-shadow: none;
}

.brand-mark img {
  object-fit: contain;
  filter: none;
}

.brand strong,
.brand small {
  display: block;
  min-width: 0;
}

.brand strong {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.25;
}

.brand small {
  margin-top: 3px;
  color: #7f8d91;
  font-size: 10px;
  line-height: 1.35;
}

.brand.active .brand-mark {
  border-color: rgba(24, 199, 163, 0.64);
  box-shadow: 0 0 0 3px rgba(24, 199, 163, 0.08);
}

.nav-list {
  display: grid;
  gap: 5px;
  align-content: start;
}

.nav-item {
  min-height: 46px;
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #8d999d;
  font-size: 13px;
  font-weight: 720;
  text-align: left;
  transform: none;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

.nav-item:hover {
  color: #eef3f1;
  border-color: transparent;
  background: #171e23;
  transform: none;
}

.nav-item.active {
  color: #ffffff;
  border-color: #2e3b40;
  background: #1a2428;
  box-shadow: inset 3px 0 0 var(--studio-teal);
  transform: none;
}

.nav-item.active svg {
  color: var(--studio-teal);
}

.profile-center {
  min-width: 0;
}

.profile-button {
  min-height: 68px;
  height: auto;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  gap: 10px;
  justify-items: start;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  color: #ffffff;
  background: #141b20;
  box-shadow: none;
}

.profile-button:hover,
.profile-button[aria-expanded="true"] {
  border-color: rgba(24, 199, 163, 0.52);
  background: #182126;
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border: 0;
  color: #062018;
  background: var(--studio-teal);
  font-size: 13px;
  font-weight: 900;
}

.profile-copy {
  min-width: 0;
  justify-items: start;
  text-align: left;
}

.profile-copy strong,
.profile-copy small {
  width: 100%;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.profile-copy strong {
  color: #ffffff;
  font-size: 12px;
  line-height: 1.3;
}

.profile-copy small {
  color: var(--studio-muted);
  font-size: 10px;
}

.profile-button > svg {
  color: var(--studio-muted);
}

.profile-menu {
  left: 236px;
  bottom: 16px;
  width: 272px;
  padding: 10px;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  color: var(--studio-text);
  background: #171f24;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

.profile-menu-head {
  border-bottom: 1px solid var(--studio-line-soft);
}

.profile-menu-head strong {
  color: #ffffff;
  white-space: normal;
  overflow-wrap: anywhere;
}

.profile-menu-head small {
  color: var(--studio-muted);
  white-space: normal;
}

.profile-menu button {
  min-height: 42px;
  color: var(--studio-text-soft);
  background: transparent;
}

.profile-menu button:hover {
  color: #ffffff;
  border-color: transparent;
  background: #202a30;
}

.main {
  min-width: 0;
  padding: 26px clamp(22px, 2.4vw, 42px) 52px;
}

.page.page-active {
  width: min(1660px, 100%);
  margin: 0 auto;
  animation: studio-enter 0.34s ease both;
}

.page.page-active.workspace,
.page.page-active.split {
  display: grid !important;
}

.page.page-active.home-page,
.page.page-active.auth-page {
  display: block !important;
}

.page.page-active.auth-page {
  width: 100%;
  max-width: none;
  margin: 0;
}

.page.page-active.panel {
  display: grid !important;
}

.eyebrow {
  color: var(--studio-teal);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.primary-btn,
.ghost-btn,
.icon-btn,
.segment,
.source-tab,
.chip-btn {
  min-height: 42px;
  border-radius: 7px;
  box-shadow: none;
  font-weight: 760;
}

.primary-btn {
  padding: 0 17px;
  color: #061a14;
  border-color: var(--studio-teal);
  background: var(--studio-teal);
  box-shadow: none;
}

.primary-btn:hover {
  transform: translateY(-1px);
  border-color: #3bd6b5;
  background: #3bd6b5;
  box-shadow: 0 10px 24px rgba(24, 199, 163, 0.16);
}

.ghost-btn,
.panel .ghost-btn,
.creator-panel .ghost-btn,
.preview-panel .ghost-btn,
.result-panel .ghost-btn {
  color: var(--studio-text-soft);
  border-color: var(--studio-line);
  background: #171e23;
  backdrop-filter: none;
}

.ghost-btn:hover,
.panel .ghost-btn:hover,
.creator-panel .ghost-btn:hover,
.preview-panel .ghost-btn:hover,
.result-panel .ghost-btn:hover {
  color: #ffffff;
  border-color: #3d4b52;
  background: #20292f;
  transform: translateY(-1px);
}

.icon-btn {
  color: var(--studio-text-soft);
  border-color: var(--studio-line);
  background: transparent;
}

.icon-btn:hover {
  color: #ffffff;
  border-color: #435159;
  background: #20292f;
}

.text-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 4px;
  border: 0;
  color: var(--studio-text-soft);
  background: transparent;
  font-size: 13px;
  font-weight: 720;
}

.text-action svg {
  width: 16px;
  height: 16px;
}

.text-action:hover {
  color: var(--studio-teal);
}

input,
select,
textarea {
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--studio-line);
  border-radius: 7px;
  color: var(--studio-text);
  background: #0f1519;
  box-shadow: none;
}

input::placeholder,
textarea::placeholder {
  color: #667376;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #3a474e;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--studio-teal);
  box-shadow: 0 0 0 3px rgba(24, 199, 163, 0.1);
}

select option {
  color: var(--studio-text);
  background: #11171b;
}

label span,
.field-caption {
  color: var(--studio-text-soft);
  font-size: 13px;
  font-weight: 680;
}

.pill,
.pill.soft {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #334047;
  border-radius: 999px;
  color: var(--studio-text-soft);
  background: #171f24;
  font-size: 11px;
  font-weight: 760;
}

.toast {
  right: 24px;
  bottom: 24px;
  border: 1px solid #365049;
  border-radius: 7px;
  color: #ffffff;
  background: #17241f;
  box-shadow: var(--studio-shadow);
}

/* Authentication */

.shell.auth-active {
  display: block;
  background: #070b0e;
}

.shell.auth-active .main {
  min-height: 100vh;
  padding: 0;
}

.auth-page {
  min-height: 100vh;
  padding: 0;
  color: #ffffff;
  background: #070b0e;
}

.auth-layout {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 24px 40px;
  align-items: center;
  overflow: hidden;
  padding: 44px clamp(38px, 6vw, 112px);
  border: 0;
  border-radius: 0;
  background: #071015;
}

.auth-layout::before,
.auth-layout::after {
  display: none;
}

.auth-backdrop-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.86) contrast(1.04);
}

.auth-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(4, 9, 12, 0.67);
}

.auth-brand,
.auth-hero-panel,
.auth-card {
  position: relative;
  z-index: 2;
}

.auth-brand {
  position: relative;
  top: auto;
  left: auto;
  grid-column: 1 / -1;
  width: auto;
  display: grid;
  grid-template-columns: 56px auto;
  align-items: center;
  justify-self: start;
  gap: 13px;
  color: #ffffff;
  text-decoration: none;
}

.auth-brand .brand-mark {
  width: 56px;
  height: 48px;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  font-size: 17px;
}

.auth-brand small {
  margin-top: 3px;
  color: #99a8aa;
  font-size: 11px;
}

.auth-hero-panel {
  width: auto;
  min-height: 0;
  display: block;
  align-self: center;
  max-width: 810px;
  padding: 0;
}

.auth-copy {
  max-width: 740px;
}

.auth-copy h1 {
  margin: 16px 0 18px;
  color: #ffffff;
  font-size: clamp(46px, 5vw, 76px);
  line-height: 1.02;
  font-weight: 830;
  letter-spacing: 0;
}

.auth-copy h1 span {
  display: block;
  white-space: nowrap;
}

.auth-copy p:not(.eyebrow) {
  max-width: 660px;
  margin: 0;
  color: #bdc7c6;
  font-size: 17px;
  line-height: 1.75;
}

.auth-capabilities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 720px;
  margin-top: 32px;
}

.auth-capabilities span {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  color: #d7dfdd;
  background: rgba(8, 15, 18, 0.62);
  font-size: 13px;
  font-weight: 680;
}

.auth-capabilities svg {
  width: 18px;
  height: 18px;
  color: var(--studio-teal);
}

.auth-card {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  transform: none;
  align-self: center;
  width: 100%;
  display: grid;
  gap: 0;
  overflow: visible;
  padding: 22px;
  border: 1px solid #314149;
  border-radius: 8px;
  color: var(--studio-text);
  background: rgba(15, 22, 27, 0.94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.auth-card::before {
  display: none;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--studio-line);
  border-radius: 7px;
  background: #0c1216;
}

.auth-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  color: var(--studio-muted);
  background: transparent;
  font-weight: 760;
}

.auth-tabs button.active {
  color: #071a14;
  background: var(--studio-teal);
  box-shadow: none;
}

.auth-card-head {
  margin: 24px 0 20px;
}

.auth-card-head h2 {
  margin: 7px 0 9px;
  color: #ffffff;
  font-size: 32px;
  line-height: 1.16;
}

.auth-card-head p:not(.eyebrow) {
  margin: 0;
  color: var(--studio-muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.auth-form label {
  gap: 7px;
}

.auth-form input {
  min-height: 50px;
}

.auth-form input.is-invalid {
  border-color: var(--studio-danger);
  box-shadow: 0 0 0 3px rgba(239, 100, 100, 0.1);
}

.auth-field-error,
.auth-form-error {
  color: #ff9a9a;
}

.auth-form-error {
  margin: -2px 0 0;
  padding: 10px 11px;
  border: 1px solid rgba(239, 100, 100, 0.46);
  border-radius: 6px;
  background: rgba(239, 100, 100, 0.1);
}

.auth-primary,
.auth-secondary {
  width: 100%;
  min-height: 48px;
}

.auth-secondary {
  color: var(--studio-text-soft);
  border-color: var(--studio-line);
  background: #12191e;
}

.auth-user-badge {
  border-color: var(--studio-line);
  background: #11181c;
}

/* Home command center */

.home-page {
  display: grid;
  gap: 18px;
}

.command-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  gap: 28px;
  align-items: end;
  padding: 6px 0 10px;
}

.command-heading {
  min-width: 0;
}

.command-heading h1 {
  max-width: 780px;
  margin: 8px 0 8px;
  color: #ffffff;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.08;
  font-weight: 790;
  letter-spacing: 0;
}

.command-heading > p:not(.eyebrow) {
  margin: 0;
  color: var(--studio-muted);
  font-size: 14px;
  line-height: 1.65;
}

.command-input {
  min-height: 58px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 7px 7px 16px;
  border: 1px solid #344149;
  border-radius: 8px;
  background: #11181d;
}

.command-input > svg {
  width: 20px;
  height: 20px;
  color: var(--studio-teal);
}

.command-input input {
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.command-input button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid var(--studio-teal);
  border-radius: 6px;
  color: #061a14;
  background: var(--studio-teal);
  font-weight: 780;
}

.command-input button:hover {
  background: #3bd6b5;
}

.command-input button svg {
  width: 17px;
  height: 17px;
}

.mission-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(330px, 0.68fr);
  min-height: 470px;
  overflow: hidden;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  background: var(--studio-surface);
  box-shadow: var(--studio-shadow);
}

.mission-stage {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  border-right: 1px solid var(--studio-line);
  background: #101619;
}

.mission-stage-head,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.mission-stage-head h2,
.mission-brief h2,
.section-heading h2 {
  margin: 6px 0 0;
  color: #ffffff;
  line-height: 1.24;
  letter-spacing: 0;
}

.mission-stage-head h2 {
  font-size: 23px;
}

.live-status {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #2f4842;
  border-radius: 999px;
  color: #a8d8cd;
  background: #14231f;
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.live-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--studio-teal);
  animation: status-pulse 2s ease-in-out infinite;
}

.mission-media {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(260px, 1.28fr);
  gap: 10px;
  min-height: 344px;
}

.mission-media figure {
  position: relative;
  min-width: 0;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #080d10;
}

.mission-media img,
.mission-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.human-frame img {
  object-position: 50% 28%;
}

.twin-frame img,
.twin-frame video {
  object-position: center;
}

.mission-media figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #ffffff;
  background: rgba(6, 11, 14, 0.82);
  backdrop-filter: blur(10px);
}

.mission-media figcaption span {
  color: #acb8b8;
  font-size: 11px;
}

.mission-media figcaption strong {
  font-size: 12px;
}

.mission-link {
  position: absolute;
  top: 50%;
  left: calc(36% - 19px);
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(24, 199, 163, 0.64);
  border-radius: 50%;
  color: #062018;
  background: var(--studio-teal);
  transform: translateY(-50%);
}

.mission-link svg {
  width: 18px;
  height: 18px;
}

.mission-brief {
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 26px;
  background: var(--studio-surface-raised);
}

.mission-brief h2 {
  font-size: 25px;
}

.brief-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.brief-list > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--studio-line-soft);
}

.brief-list dt {
  color: var(--studio-muted);
  font-size: 12px;
}

.brief-list dd {
  margin: 0;
  color: var(--studio-text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.mission-progress {
  display: grid;
  gap: 9px;
}

.mission-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--studio-text-soft);
  font-size: 12px;
}

.mission-progress strong {
  color: var(--studio-teal);
}

progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  color: var(--studio-teal);
  background: #0e1418;
}

progress::-webkit-progress-bar {
  background: #0e1418;
}

progress::-webkit-progress-value {
  background: var(--studio-teal);
}

progress::-moz-progress-bar {
  background: var(--studio-teal);
}

.mission-progress p {
  margin: 0;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.55;
}

.mission-action {
  width: 100%;
  min-height: 48px;
}

.pipeline-navigator {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  background: var(--studio-surface);
}

.pipeline-navigator button {
  position: relative;
  min-height: 86px;
  display: grid;
  grid-template-columns: 24px 24px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 9px;
  align-items: center;
  padding: 15px 17px;
  border: 0;
  border-right: 1px solid var(--studio-line-soft);
  color: var(--studio-text);
  background: transparent;
  text-align: left;
}

.pipeline-navigator button:last-child {
  border-right: 0;
}

.pipeline-navigator button:hover,
.pipeline-navigator button.active {
  background: #192228;
}

.pipeline-navigator button > span {
  grid-row: 1 / span 2;
  align-self: start;
  color: #58666a;
  font-size: 10px;
  font-weight: 800;
}

.pipeline-navigator button > svg {
  grid-row: 1 / span 2;
  width: 20px;
  height: 20px;
  color: var(--studio-teal);
}

.pipeline-navigator strong {
  align-self: end;
  font-size: 13px;
}

.pipeline-navigator small {
  color: var(--studio-muted);
  font-size: 10px;
}

.home-intelligence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(380px, 0.82fr);
  gap: 18px;
}

.intelligence-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  background: var(--studio-surface);
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2 {
  font-size: 20px;
}

.opportunity-list {
  display: grid;
}

.opportunity-list button {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border: 0;
  border-top: 1px solid var(--studio-line-soft);
  color: var(--studio-text);
  background: transparent;
  text-align: left;
}

.opportunity-list button:hover {
  background: #192126;
}

.opportunity-list .rank {
  color: #59666a;
  font-size: 12px;
  font-weight: 820;
}

.opportunity-list button > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.opportunity-list strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opportunity-list small {
  color: var(--studio-muted);
  font-size: 11px;
}

.signal {
  min-width: 76px;
  color: #a9b4b3;
  font-size: 11px;
  font-weight: 720;
  text-align: right;
}

.signal.up {
  color: var(--studio-coral);
}

.content-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.content-strip button {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 150px auto;
  padding: 0;
  border: 1px solid var(--studio-line-soft);
  border-radius: 7px;
  color: var(--studio-text);
  background: #10161a;
  text-align: left;
}

.content-strip button:hover {
  border-color: #405159;
  transform: translateY(-2px);
}

.content-strip img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 26%;
}

.content-strip button > span {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 11px;
}

.content-strip strong,
.content-strip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-strip strong {
  font-size: 12px;
}

.content-strip small {
  color: var(--studio-muted);
  font-size: 10px;
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--studio-line);
  border-bottom: 1px solid var(--studio-line);
}

.service-strip > div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 17px;
  border-right: 1px solid var(--studio-line-soft);
}

.service-strip > div:last-child {
  border-right: 0;
}

.service-strip span {
  color: var(--studio-muted);
  font-size: 11px;
}

.service-strip strong {
  overflow: hidden;
  color: var(--studio-text-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Creation workspaces */

.workspace,
.split {
  grid-template-columns: minmax(460px, 0.86fr) minmax(460px, 1.14fr);
  gap: 18px;
  align-items: start;
  margin-top: 0;
}

.panel,
.creator-panel,
.preview-panel,
.result-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  color: var(--studio-text);
  background: var(--studio-surface);
  box-shadow: none;
}

.panel::before,
.creator-panel::before,
.preview-panel::before,
.result-panel::before {
  display: none;
}

.panel-head {
  align-items: flex-start;
  margin-bottom: 22px;
}

.panel-head h2,
.preview-copy h2,
.result-panel h3 {
  margin: 5px 0 0;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.18;
}

.panel-head h3 {
  color: #ffffff;
}

.panel-intro {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--studio-muted);
  font-size: 13px;
  line-height: 1.65;
}

.panel .eyebrow,
.creator-panel .eyebrow,
.preview-panel .eyebrow,
.result-panel .eyebrow {
  color: var(--studio-teal);
}

.preview-copy p:not(.eyebrow),
.risk-note,
.empty-state {
  color: var(--studio-muted);
}

.segmented {
  grid-template-columns: repeat(2, minmax(126px, 1fr));
  padding: 4px;
  border-color: var(--studio-line);
  background: #0f1519;
}

.segment {
  color: var(--studio-muted);
}

.segment.active {
  color: #071a14;
  border-color: var(--studio-teal);
  background: var(--studio-teal);
  box-shadow: none;
}

.process-line {
  gap: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--studio-line);
  border-radius: 0;
  background: transparent;
}

.process-line span {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--studio-muted);
  background: transparent;
}

.process-line span.active {
  color: var(--studio-teal);
  border-bottom-color: var(--studio-teal);
  background: transparent;
}

.create-form,
.panel {
  gap: 17px;
}

.field-grid {
  gap: 14px;
}

.upload-zone,
.mini-upload,
.selected-source,
.audio-source-card,
.trend-next-panel,
.inline-result,
.manual-trend-details {
  border-color: var(--studio-line);
  border-radius: 7px;
  color: var(--studio-text);
  background: #11181c;
}

.upload-zone:hover,
.mini-upload:hover {
  border-color: var(--studio-teal);
  background: #14211e;
}

.upload-zone strong,
.mini-upload strong,
.selected-source strong,
.record-pane strong,
.inline-result strong {
  color: var(--studio-text);
}

.upload-zone span,
.mini-upload span,
.selected-source span,
.record-pane span,
.inline-result span {
  color: var(--studio-muted);
}

.source-tabs {
  border-color: var(--studio-line);
  background: #0f1519;
}

.voice-preset-block .quick-cluster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.voice-choice {
  min-height: 66px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 16px;
  align-items: center;
  justify-content: stretch;
  gap: 10px;
  padding: 9px 11px;
  color: var(--studio-text-soft);
  text-align: left;
}

.voice-choice > svg {
  width: 19px;
  height: 19px;
  color: var(--studio-muted);
}

.voice-choice > svg:last-child {
  width: 15px;
  height: 15px;
  opacity: 0.5;
}

.voice-choice > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.voice-choice strong,
.voice-choice small {
  display: block;
}

.voice-choice strong {
  color: var(--studio-text);
  font-size: 13px;
}

.voice-choice small {
  overflow: hidden;
  color: var(--studio-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-choice.active {
  border-color: var(--studio-teal);
  background: #15251f;
}

.voice-choice.active > svg {
  color: var(--studio-teal);
  opacity: 1;
}

.source-tab {
  color: var(--studio-muted);
  background: transparent;
}

.source-tab.active {
  color: #071a14;
  border-color: var(--studio-teal);
  background: var(--studio-teal);
  box-shadow: none;
}

.record-orb {
  color: #062018;
  background: var(--studio-teal);
  box-shadow: none;
}

.chip-btn {
  color: var(--studio-text-soft);
  border-color: var(--studio-line);
  background: #131a1f;
}

.chip-btn:hover {
  border-color: #425159;
  background: #1c252a;
}

.chip-btn.active {
  color: #071a14;
  border-color: var(--studio-teal);
  background: var(--studio-teal);
  box-shadow: none;
}

.preview-panel,
.result-panel {
  position: sticky;
  top: 26px;
  max-height: calc(100vh - 52px);
  overflow: auto;
}

.phone-frame {
  width: min(370px, 100%);
  border-color: #303d44;
  border-radius: 8px;
  background: #0c1115;
  box-shadow: none;
}

.phone-frame img {
  object-position: center 22%;
}

.demo-gallery button {
  border-color: var(--studio-line);
  border-radius: 6px;
  background: #0f1519;
}

.demo-gallery button.active {
  border-color: var(--studio-teal);
  box-shadow: 0 0 0 2px rgba(24, 199, 163, 0.12);
}

.voice-console {
  min-height: 0;
}

.voice-console::after {
  display: none;
}

.voice-monitor {
  border-color: #29433d;
  background: #111d1a;
}

.voice-avatar {
  color: #052019;
  background: var(--studio-teal);
  box-shadow: none;
}

.voice-wave {
  background: #0b1215;
}

.voice-wave span {
  background: var(--studio-teal);
}

.voice-wave span:nth-child(3n) {
  background: var(--studio-blue);
}

.voice-wave span:nth-child(4n) {
  background: var(--studio-amber);
}

.voice-metrics span,
.mini-metrics span {
  border-color: var(--studio-line);
  color: var(--studio-text-soft);
  background: #141c21;
}

.visual-result {
  min-height: 660px;
}

.image-empty-composer {
  border: 1px dashed #334149;
  border-radius: 7px;
  background: #0e1418;
}

.cover-canvas {
  display: none;
}

.visual-preset-showcase {
  width: 100%;
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(180px, 0.55fr);
  grid-template-rows: repeat(2, minmax(170px, 1fr));
  gap: 10px;
}

.visual-preset-showcase figure {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--studio-line);
  border-radius: 6px;
  background: #090e11;
}

.visual-preset-showcase .visual-preset-featured {
  grid-row: 1 / -1;
}

.visual-preset-showcase img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.visual-preset-showcase figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: #ffffff;
  background: rgba(8, 13, 16, 0.86);
}

.visual-preset-showcase figcaption span {
  color: var(--studio-teal);
  font-size: 10px;
  font-weight: 800;
}

.visual-preset-showcase figcaption strong {
  font-size: 12px;
  line-height: 1.35;
}

.cover-brief {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.cover-brief span {
  border-color: var(--studio-line);
  color: var(--studio-text-soft);
  background: #151d22;
}

#imageResult img,
.visual-result img {
  max-height: calc(100vh - 180px);
  object-fit: contain;
  border-radius: 6px;
  background: #080c0f;
}

/* Trend intelligence */

#trends {
  grid-template-columns: minmax(500px, 0.84fr) minmax(0, 1.16fr);
}

#trends > .panel {
  position: sticky;
  top: 26px;
  max-height: calc(100vh - 52px);
  overflow-x: hidden;
  overflow-y: auto;
}

.trend-search-grid {
  grid-template-columns: minmax(130px, 0.68fr) minmax(0, 1.32fr);
}

.trend-next-panel {
  display: grid;
  gap: 15px;
  padding: 22px 0 0;
  border: 0;
  border-top: 1px solid var(--studio-line);
  border-radius: 0;
  background: transparent;
}

.trend-next-panel h3 {
  margin: 5px 0 0;
  color: #ffffff;
  font-size: 20px;
}

.manual-trend-details {
  padding: 14px;
  background: #12191e;
}

.manual-trend-details summary {
  color: var(--studio-text-soft);
}

#trendResult {
  position: static;
  max-height: calc(100vh - 52px);
  overflow: auto;
  background: #12181d;
}

.trend-idle-state {
  min-height: calc(100vh - 102px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.trend-idle-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--studio-line);
}

.trend-idle-head h2 {
  margin: 5px 0 8px;
  color: #ffffff;
  font-size: 30px;
}

.trend-idle-head p:not(.eyebrow) {
  max-width: 640px;
  margin: 0;
  color: var(--studio-muted);
  font-size: 13px;
  line-height: 1.65;
}

.trend-live-indicator {
  flex: 0 0 auto;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #315047;
  border-radius: 999px;
  color: #bfe8df;
  background: #14251f;
  font-size: 11px;
  font-weight: 760;
}

.trend-live-indicator > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--studio-teal);
  box-shadow: 0 0 0 5px rgba(24, 199, 163, 0.09);
  animation: trend-live-pulse 1.8s ease-in-out infinite;
}

.trend-signal-board {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.55fr);
}

.trend-chart-wrap {
  min-width: 0;
  display: grid;
  align-content: center;
  padding: 30px 28px 28px 0;
  border-right: 1px solid var(--studio-line);
}

.chart-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.chart-caption span {
  color: var(--studio-text-soft);
  font-size: 12px;
}

.chart-caption strong {
  color: var(--studio-amber);
  font-size: 14px;
}

#trendPulseChart {
  width: 100%;
  height: 220px;
  display: block;
}

.chart-scale {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: 4px;
  color: #62706f;
  font-size: 9px;
  text-align: center;
}

.trend-signal-summary {
  min-width: 0;
  display: grid;
  align-content: center;
  padding-left: 24px;
}

.trend-signal-summary button {
  min-width: 0;
  min-height: 78px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--studio-line);
  border-radius: 0;
  color: var(--studio-text);
  background: transparent;
  text-align: left;
}

.trend-signal-summary button:last-child {
  border-bottom: 0;
}

.trend-signal-summary button:hover {
  padding-left: 8px;
  color: #ffffff;
  background: #161f23;
}

.trend-signal-summary button > span {
  grid-row: 1 / -1;
  color: #64716f;
  font-size: 10px;
}

.trend-signal-summary button > strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-signal-summary button > small {
  min-width: 0;
  overflow: hidden;
  color: var(--studio-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-signal-summary button > b {
  grid-column: 3;
  grid-row: 1 / -1;
  color: var(--studio-teal);
  font-size: 10px;
}

.trend-keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding-top: 20px;
  border-top: 1px solid var(--studio-line);
}

.trend-keyword-cloud > span {
  margin-right: 4px;
  color: var(--studio-muted);
  font-size: 11px;
}

.trend-keyword-cloud button {
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--studio-line);
  border-radius: 999px;
  color: var(--studio-text-soft);
  background: #151d22;
  font-size: 11px;
}

.trend-keyword-cloud button:hover {
  color: #ffffff;
  border-color: #356257;
  background: #172620;
}

.trend-result-head,
.trend-source-note,
.trend-video-item,
.trend-analysis {
  border-color: var(--studio-line);
  color: var(--studio-text);
  background: #151c21;
}

.trend-video-item {
  box-shadow: none;
}

.trend-video-item.selected {
  border-color: var(--studio-teal);
  background: #17231f;
}

.trend-video-item img {
  background: #0a0f12;
}

.trend-stat,
.trend-platform {
  color: #bfe8df;
  border-color: #285047;
  background: #15302a;
}

.trend-video-item h3,
.trend-analysis h3,
.trend-result-head h2 {
  color: #ffffff;
}

.trend-video-item p,
.trend-video-item small,
.trend-source-note,
.trend-analysis p,
.trend-analysis li {
  color: var(--studio-muted);
}

/* Task library */

#jobs,
#account {
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  background: var(--studio-surface);
}

#jobs > .panel-head,
#account > .panel-head {
  margin-bottom: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--studio-line);
}

.job-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--studio-line);
  border-radius: 7px;
  background: #10161a;
}

.job-item {
  margin: 0;
  padding: 19px;
  border: 0;
  border-bottom: 1px solid var(--studio-line);
  border-radius: 0;
  color: var(--studio-text);
  background: transparent;
  box-shadow: none;
}

.job-item:last-child {
  border-bottom: 0;
}

.job-item.status-ready,
.job-item.status-running,
.job-item.status-waiting,
.job-item.status-failed {
  background: transparent;
}

.job-title strong,
.job-item h3 {
  color: #ffffff;
}

.job-title span,
.job-item p,
.job-hint {
  color: var(--studio-muted);
}

.job-meta span {
  border-color: var(--studio-line);
  color: var(--studio-text-soft);
  background: #151d22;
}

.job-stages {
  gap: 4px;
}

.job-stages span {
  border-color: var(--studio-line);
  color: var(--studio-muted);
  background: #12191d;
}

.job-stages .done,
.job-stages .current {
  color: #b7eadf;
  border-color: #285047;
  background: #163029;
}

.job-actions a,
.job-actions button {
  min-height: 44px;
}

/* Account and administrator */

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

.account-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--studio-line);
  border-radius: 7px;
  color: var(--studio-text);
  background: #11181d;
}

.account-card h3 {
  color: #ffffff;
}

.account-quota {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--studio-line-soft);
  border-radius: 7px;
}

.quota-row {
  padding: 13px;
  border-bottom: 1px solid var(--studio-line-soft);
  background: #0e1418;
}

.quota-row:last-child {
  border-bottom: 0;
}

.quota-row strong {
  color: var(--studio-text);
}

.quota-row span,
.quota-row small {
  color: var(--studio-muted);
}

.account-users {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--studio-line);
  border-radius: 7px;
  background: #10161a;
}

.account-user-row {
  margin: 0;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid var(--studio-line);
  border-radius: 0;
  color: var(--studio-text);
  background: transparent;
}

.account-user-row:last-child {
  border-bottom: 0;
}

.account-user-row strong {
  color: #ffffff;
}

.account-user-row input,
.account-user-row select {
  min-height: 44px;
  background: #0e1418;
}

.account-user-row button {
  min-width: 44px;
  min-height: 44px;
}

.job-empty-state {
  min-height: 410px;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(380px, 1.18fr);
  align-items: center;
  gap: 56px;
  padding: 42px 18px;
}

.job-empty-copy h3 {
  margin: 7px 0 12px;
  color: #ffffff;
  font-size: 32px;
}

.job-empty-copy > p:not(.eyebrow) {
  max-width: 520px;
  margin: 0;
  color: var(--studio-muted);
  font-size: 14px;
  line-height: 1.7;
}

.job-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.job-empty-actions button {
  min-height: 44px;
}

.empty-job-pipeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.empty-job-pipeline::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 20px;
  width: 1px;
  background: var(--studio-line);
}

.empty-job-pipeline li {
  position: relative;
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 3px 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--studio-line-soft);
}

.empty-job-pipeline li:last-child {
  border-bottom: 0;
}

.empty-job-pipeline span {
  z-index: 1;
  grid-row: 1 / -1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #315047;
  border-radius: 50%;
  color: var(--studio-teal);
  background: var(--studio-surface);
  font-size: 10px;
  font-weight: 800;
}

.empty-job-pipeline strong {
  color: var(--studio-text);
  font-size: 13px;
}

.empty-job-pipeline small {
  color: var(--studio-muted);
  font-size: 11px;
}

.system-readiness-item {
  border-color: var(--studio-line);
  background: #0e1418;
}

.account-security-notice {
  color: #f8dca1;
  border-color: #5c4a25;
  background: #2a2418;
}

/* Motion */

@keyframes trend-live-pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes studio-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.86);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Tablet */

@media (max-width: 1240px) {
  .shell {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 10px;
  }

  .brand {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-inline: 0;
  }

  .brand strong,
  .brand small {
    display: none;
  }

  .nav-item {
    min-height: 56px;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 6px 2px;
    font-size: 10px;
    text-align: center;
  }

  .profile-button {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 8px 4px;
  }

  .profile-copy,
  .profile-button > svg {
    display: none;
  }

  .profile-menu {
    left: 94px;
  }

  .mission-workspace {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  }

  .mission-media {
    grid-template-columns: minmax(0, 0.82fr) minmax(220px, 1.18fr);
  }

  .home-intelligence-grid {
    grid-template-columns: 1fr;
  }

  .content-strip button {
    grid-template-rows: 190px auto;
  }

  .workspace,
  .split,
  #trends {
    grid-template-columns: minmax(400px, 0.9fr) minmax(420px, 1.1fr);
  }
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
    padding: 34px;
  }

  .auth-copy h1 {
    font-size: 48px;
  }

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

  .command-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .mission-workspace {
    grid-template-columns: 1fr;
  }

  .mission-stage {
    border-right: 0;
    border-bottom: 1px solid var(--studio-line);
  }

  .pipeline-navigator {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(170px, 1fr));
  }

  .pipeline-navigator button {
    border-bottom: 0;
  }

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

  .service-strip > div:nth-child(2) {
    border-right: 0;
  }

  .service-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--studio-line-soft);
  }

  .workspace,
  .split,
  #trends {
    grid-template-columns: 1fr;
  }

  .preview-panel,
  .result-panel,
  #trends > .panel,
  #trendResult {
    position: static;
    max-height: none;
  }

  .preview-panel {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(300px, 1.2fr);
    gap: 18px;
  }

  .preview-panel .preview-copy {
    grid-column: 1 / -1;
  }

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

@media (max-height: 820px) and (min-width: 761px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 400px);
    gap: 16px 34px;
    padding: 24px clamp(36px, 4vw, 64px);
  }

  .auth-brand {
    grid-template-columns: 48px auto;
  }

  .auth-brand .brand-mark {
    width: 48px;
    height: 42px;
  }

  .auth-hero-panel {
    max-width: 760px;
  }

  .auth-copy h1 {
    margin: 10px 0 12px;
    font-size: clamp(42px, 4.2vw, 56px);
  }

  .auth-copy p:not(.eyebrow) {
    font-size: 14px;
    line-height: 1.55;
  }

  .auth-capabilities {
    margin-top: 18px;
  }

  .auth-capabilities span {
    min-height: 42px;
    font-size: 11px;
  }

  .auth-card {
    padding: 18px;
  }

  .auth-tabs button {
    min-height: 44px;
  }

  .auth-card-head {
    margin: 15px 0 13px;
  }

  .auth-card-head h2 {
    margin-block: 5px 6px;
    font-size: 28px;
  }

  .auth-card-head p:not(.eyebrow) {
    font-size: 12px;
    line-height: 1.45;
  }

  .auth-form {
    gap: 10px;
  }

  .auth-form label {
    gap: 5px;
  }

  .auth-form input {
    min-height: 44px;
  }

  .auth-primary,
  .auth-secondary {
    min-height: 43px;
  }
}

/* Mobile */

@media (max-width: 760px) {
  html {
    scroll-padding-top: 68px;
  }

  body {
    padding-bottom: 74px;
  }

  .page {
    scroll-margin-top: 68px;
  }

  .shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 4000;
    width: 100%;
    height: 70px;
    display: block;
    padding: 0;
    border: 0;
    border-top: 1px solid var(--studio-line);
    background: rgba(13, 18, 22, 0.97);
    backdrop-filter: none;
  }

  .sidebar > .brand {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 4100;
    width: auto;
    display: grid;
    grid-template-columns: 44px auto;
    gap: 8px;
    padding: 0;
  }

  .sidebar > .brand .brand-mark {
    width: 44px;
    height: 44px;
  }

  .sidebar > .brand strong {
    font-size: 13px;
  }

  .sidebar > .brand small {
    display: none;
  }

  .nav-list {
    height: 70px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
  }

  .nav-item {
    min-width: 0;
    min-height: 70px;
    gap: 3px;
    padding: 8px 2px 6px;
    border: 0;
    border-radius: 0;
    font-size: 9px;
  }

  .nav-item svg {
    width: 20px;
    height: 20px;
  }

  .nav-item.active {
    border: 0;
    background: #182126;
    box-shadow: inset 0 3px 0 var(--studio-teal);
  }

  #adminAccountNav {
    display: none !important;
  }

  .profile-center {
    position: fixed !important;
    top: 10px !important;
    right: 12px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 4100;
    width: 44px;
  }

  .profile-button {
    width: 44px;
    min-height: 44px;
    grid-template-columns: 1fr;
    padding: 4px;
    border-radius: 50%;
  }

  .profile-copy,
  .profile-button > svg {
    display: none;
  }

  .profile-menu {
    position: fixed;
    top: 62px;
    right: 12px;
    bottom: auto;
    left: auto;
    width: min(286px, calc(100vw - 24px));
  }

  .main {
    padding: 68px 14px 24px;
  }

  .shell.auth-active .main {
    padding: 0;
  }

  .auth-layout {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 24px;
    overflow: auto;
    padding: 20px 16px 34px;
  }

  .auth-backdrop-image {
    object-position: 60% center;
  }

  .auth-atmosphere {
    background: rgba(4, 9, 12, 0.76);
  }

  .auth-brand {
    width: calc(100% - 58px);
    grid-template-columns: 48px auto;
  }

  .auth-brand .brand-mark {
    width: 48px;
    height: 42px;
  }

  .auth-hero-panel {
    width: 100%;
    padding-top: 24px;
  }

  .auth-copy h1 {
    max-width: 330px;
    margin: 12px 0;
    font-size: 39px;
    line-height: 1.04;
  }

  .auth-copy h1 span {
    white-space: normal;
  }

  .auth-copy p:not(.eyebrow) {
    max-width: 340px;
    font-size: 14px;
    line-height: 1.65;
  }

  .auth-capabilities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 20px;
  }

  .auth-capabilities span {
    min-height: 44px;
    padding: 0 10px;
    font-size: 11px;
  }

  .auth-card {
    width: 100%;
    margin-top: 4px;
    padding: 18px;
    background: rgba(15, 22, 27, 0.97);
  }

  .voice-preset-block .quick-cluster {
    grid-template-columns: 1fr;
  }

  .visual-preset-showcase {
    min-height: 520px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(250px, 1fr) 160px;
  }

  .visual-preset-showcase .visual-preset-featured {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .trend-idle-state {
    min-height: auto;
  }

  .trend-idle-head {
    display: grid;
  }

  .trend-live-indicator {
    justify-self: start;
  }

  .trend-signal-board {
    grid-template-columns: 1fr;
  }

  .trend-chart-wrap {
    padding: 24px 0;
    border-right: 0;
    border-bottom: 1px solid var(--studio-line);
  }

  #trendPulseChart {
    height: 180px;
  }

  .trend-signal-summary {
    padding: 8px 0;
  }

  .job-empty-state {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px 0;
  }

  .job-empty-copy h3 {
    font-size: 27px;
  }

  .auth-card-head {
    margin: 20px 0 16px;
  }

  .auth-card-head h2 {
    font-size: 28px;
  }

  .home-page {
    gap: 14px;
  }

  .command-header {
    gap: 18px;
    padding: 0 48px 4px 0;
  }

  .command-heading h1 {
    font-size: 31px;
  }

  .command-input {
    grid-template-columns: 20px minmax(0, 1fr);
    padding: 9px 12px;
  }

  .command-input button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .mission-workspace {
    min-height: 0;
  }

  .mission-stage,
  .mission-brief {
    padding: 16px;
  }

  .mission-stage-head {
    display: grid;
  }

  .mission-stage-head h2 {
    font-size: 20px;
  }

  .live-status {
    justify-self: start;
  }

  .mission-media {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    min-height: 280px;
  }

  .mission-media figcaption {
    right: 7px;
    bottom: 7px;
    left: 7px;
    display: grid;
    min-height: 48px;
    padding: 7px 9px;
  }

  .mission-link {
    left: calc(46% - 17px);
    width: 34px;
    height: 34px;
  }

  .mission-brief h2 {
    font-size: 22px;
  }

  .pipeline-navigator {
    grid-template-columns: repeat(5, 156px);
  }

  .pipeline-navigator button {
    min-height: 80px;
    padding: 13px;
  }

  .home-intelligence-grid {
    gap: 14px;
  }

  .intelligence-panel {
    padding: 16px;
  }

  .section-heading h2 {
    font-size: 18px;
  }

  .opportunity-list button {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .opportunity-list strong {
    white-space: normal;
  }

  .opportunity-list .signal {
    grid-column: 2;
    text-align: left;
  }

  .content-strip {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .content-strip button {
    flex: 0 0 64%;
    grid-template-rows: 185px auto;
    scroll-snap-align: start;
  }

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

  .service-strip > div {
    min-height: 50px;
    border-right: 0;
    border-bottom: 1px solid var(--studio-line-soft);
  }

  .service-strip > div:last-child {
    border-bottom: 0;
  }

  .panel,
  .creator-panel,
  .preview-panel,
  .result-panel,
  #jobs,
  #account {
    padding: 16px;
  }

  .panel-head {
    align-items: flex-start;
  }

  .panel-head h2,
  .preview-copy h2,
  .result-panel h3 {
    font-size: 24px;
  }

  .segmented {
    width: 100%;
  }

  .creator-panel > .panel-head {
    display: grid;
  }

  .field-grid,
  .trend-search-grid {
    grid-template-columns: 1fr;
  }

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

  .form-actions > button {
    width: 100%;
    min-height: 46px;
  }

  .preview-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .preview-panel .preview-copy {
    grid-column: auto;
  }

  .phone-frame {
    width: min(100%, 380px);
    justify-self: center;
  }

  .voice-console,
  .visual-result {
    min-height: 460px;
  }

  .voice-monitor {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .voice-metrics {
    grid-column: 1 / -1;
  }

  .quick-cluster {
    gap: 7px;
  }

  .quick-cluster .chip-btn {
    min-height: 44px;
  }

  #trends > .panel {
    max-height: none;
  }

  .trend-next-panel {
    padding: 15px;
  }

  #jobs > .panel-head,
  #account > .panel-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-right: 0;
  }

  #jobs > .panel-head > div,
  #account > .panel-head > div {
    min-width: 0;
  }

  #jobs > .panel-head h2,
  #account > .panel-head h2 {
    font-size: 24px;
  }

  #jobs > .panel-head > .ghost-btn,
  #account > .panel-head > .ghost-btn {
    width: 92px;
    min-width: 92px;
    flex: 0 0 92px;
  }

  .job-item {
    padding: 15px;
  }

  .job-stages {
    grid-template-columns: 1fr;
  }

  .job-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .job-actions button {
    width: 100%;
    min-height: 44px;
  }

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

  .account-user-row label,
  .account-user-row button {
    min-height: 44px;
  }

  .toast {
    right: 12px;
    bottom: 84px;
    left: 12px;
    width: auto;
  }
}

@media (max-width: 430px) {
  .main {
    padding-inline: 10px;
  }

  .command-heading h1 {
    font-size: 28px;
  }

  .mission-media {
    min-height: 248px;
  }

  .mission-media figcaption strong {
    font-size: 11px;
  }

  .brief-list > div {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .auth-copy h1 {
    font-size: 34px;
  }

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

.trend-source-status,
.trend-source-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.trend-source-status {
  margin-top: 2px;
}

.trend-source-status span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid rgba(204, 232, 255, 0.15);
  border-radius: 5px;
  color: var(--paper-muted);
  background: rgba(255, 255, 255, 0.045);
}

.trend-source-status span[data-source-state="ready"] {
  border-color: rgba(53, 224, 160, 0.26);
  color: #bfffe2;
  background: rgba(53, 224, 160, 0.1);
}

.trend-source-status span[data-source-state="login"] {
  border-color: rgba(245, 190, 92, 0.3);
  color: #ffe0a3;
  background: rgba(245, 190, 92, 0.11);
}

.trend-source-status span[data-source-state="offline"] {
  border-color: rgba(255, 113, 113, 0.28);
  color: #ffc1c1;
  background: rgba(255, 113, 113, 0.09);
}

.trend-source-actions {
  margin-top: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
[data-protected-href][aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}
