:root {
  color-scheme: light;
  --ink: #202522;
  --muted: #66716d;
  --line: #dce4e0;
  --paper: #f8faf9;
  --surface: #ffffff;
  --teal: #3f9b8f;
  --teal-dark: #246f67;
  --pine: #172d28;
  --sage: #e6f0ea;
  --sky: #e8f0f4;
  --rose: #f3e7e8;
  --gold: #b98b45;
  --danger: #a64848;
  --shadow: 0 14px 36px rgba(31, 43, 39, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button,
input,
select,
a {
  outline-offset: 3px;
}

:focus-visible {
  outline: 3px solid rgba(63, 155, 143, 0.52);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: white;
  color: var(--pine);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-status {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 100;
  width: 0;
  height: 3px;
  background: var(--teal);
  opacity: 0;
  transition: opacity 120ms ease;
}

.app-status.visible {
  width: 72%;
  opacity: 1;
  animation: loading-bar 1.2s ease-in-out infinite;
}

@keyframes loading-bar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(145%); }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(420px, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 12px clamp(18px, 3vw, 48px);
  background: rgba(20, 29, 26, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.brand {
  display: block;
  width: 210px;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: transparent;
  color: white;
  font-size: 25px;
  cursor: pointer;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.nav a {
  padding: 10px 11px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover,
.nav a.selected {
  color: white;
  box-shadow: inset 0 -2px 0 var(--teal);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.64);
}

.search span {
  font-size: 12px;
}

.search input {
  width: min(17vw, 230px);
  border: 0;
  background: transparent;
  color: white;
}

.search input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.button,
.icon-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--teal);
}

.icon-button {
  width: 44px;
  padding: 0;
}

.button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.button.primary:hover {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.button.light {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.button.ghost {
  background: transparent;
}

.topbar .button.ghost,
.topbar .icon-button {
  border-color: rgba(255, 255, 255, 0.22);
  background: transparent;
  color: white;
}

.session-status {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.button.text {
  min-height: 38px;
  padding: 0 6px;
  border-color: transparent;
  background: transparent;
  color: var(--teal-dark);
}

.button.full {
  width: 100%;
}

main {
  min-height: 72vh;
}

.view {
  display: none;
  padding: clamp(18px, 2.4vw, 38px) clamp(18px, 3.2vw, 52px) clamp(42px, 6vw, 84px);
}

.view.active {
  display: block;
}

.back-row {
  max-width: 1280px;
  margin: 0 auto 18px;
}

.back-row.policy-back {
  max-width: 1200px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font-weight: 800;
  cursor: pointer;
}

.back-button span {
  font-size: 21px;
  transition: transform 160ms ease;
}

.back-button:hover span {
  transform: translateX(-3px);
}

.hero {
  min-height: min(620px, 76vh);
  display: flex;
  align-items: center;
  padding: clamp(34px, 6vw, 82px);
  overflow: hidden;
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(90deg, rgba(11, 20, 17, 0.76) 0%, rgba(16, 27, 23, 0.44) 46%, rgba(16, 27, 23, 0.04) 78%),
    url("/apps/web/assets/hero-wellness-v1.webp") center / cover;
}

.hero-copy {
  width: min(720px, 58%);
  min-width: 0;
}

.hero h1,
.page-hero h1,
.direction-hero h1,
.policy-main > h1,
.product-main > h1,
.page-head h1 {
  margin: 0;
  letter-spacing: 0;
}

.hero h1 {
  font-size: clamp(40px, 4.7vw, 70px);
  line-height: 1.08;
}

.hero-copy > p {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.65;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 44px;
}

.hero-benefits > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.hero-benefits > div > span {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(63, 155, 143, 0.92);
}

.hero-benefits p,
.hero-benefits strong,
.hero-benefits small {
  display: block;
  margin: 0;
  line-height: 1.35;
}

.hero-benefits strong {
  font-size: 13px;
}

.hero-benefits small {
  color: rgba(255, 255, 255, 0.68);
}

.section {
  margin-top: clamp(42px, 6vw, 76px);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: 0;
}

.grid {
  display: grid;
  gap: 18px;
}

#categoryGrid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.category-card,
.product-card,
.specialist-card,
.trust-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.category-card:hover,
.product-card:hover,
.specialist-card:hover,
.trust-card:hover {
  transform: translateY(-3px);
  border-color: #bbd2ca;
  box-shadow: 0 20px 46px rgba(31, 43, 39, 0.14);
}

.category-card {
  min-height: 238px;
  display: flex;
  flex-direction: column;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.category-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.category-copy {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px 14px 16px;
}

.category-copy strong {
  font-size: 17px;
}

.category-copy em,
.product-meta,
.specialist-card em {
  color: var(--muted);
  font-style: normal;
}

.specialist-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 0 clamp(18px, 4vw, 64px) 64px;
}

.specialist-profile-heading {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-bottom: 24px;
}

.specialist-monogram.large {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  font-size: 30px;
}

.profile-warning {
  padding: 18px 20px;
  border: 1px solid #decda9;
  border-radius: 8px;
  background: #fff8e8;
}

.profile-warning p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.compact-section {
  padding-inline: 0;
}

.specialist-facts {
  align-self: start;
}

.two-column {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}

.stack,
.benefit-grid,
.timeline,
.module-list,
.policy-sections,
.pipeline,
.finance-table {
  display: grid;
  gap: 14px;
}

.benefit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.benefit-card {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.benefit-card > span {
  color: var(--teal);
  font-weight: 800;
}

.benefit-card h3 {
  margin: 12px 0 6px;
}

.benefit-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.list-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 16px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.list-row span {
  grid-row: 1 / 3;
  color: var(--teal-dark);
  font-weight: 800;
}

.list-row em {
  color: var(--muted);
  font-style: normal;
}

.page-hero {
  min-height: 320px;
  display: flex;
  align-items: end;
  padding: clamp(32px, 6vw, 74px);
  background: var(--sage);
  border-left: 5px solid var(--teal);
}

.page-hero.compact {
  min-height: 270px;
  background: var(--sky);
  border-left-color: #668ea0;
}

.page-hero.trust-hero {
  background: var(--rose);
  border-left-color: #ad7378;
}

.page-hero > div {
  max-width: 850px;
}

.page-hero h1,
.direction-hero h1,
.policy-main > h1,
.product-main > h1,
.page-head h1 {
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.05;
}

.page-hero p,
.direction-hero p,
.policy-main > .lead,
.product-main > .lead {
  max-width: 820px;
  margin: 18px 0 0;
  color: #44504b;
  font-size: 18px;
  line-height: 1.65;
}

.catalog-tools {
  display: flex;
  align-items: end;
  gap: 16px;
  margin: 28px 0 20px;
}

.catalog-tools label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.catalog-tools select {
  min-width: min(360px, 70vw);
  height: 44px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-card {
  display: flex;
  flex-direction: column;
}

.product-image {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #dce5e1;
  cursor: pointer;
}

.product-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.product-image > span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(20, 29, 26, 0.86);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.product-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.product-direction {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-copy h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}

.product-copy > p:not(.product-direction) {
  margin: 12px 0;
  color: var(--muted);
  line-height: 1.55;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.product-meta strong {
  color: var(--ink);
}

.product-copy .button {
  align-self: start;
  margin-top: 8px;
}

.state-panel {
  padding: 48px 24px;
  margin-bottom: 20px;
  border: 1px dashed #aebfba;
  background: white;
  text-align: center;
}

.reviews-empty {
  padding: 28px;
  border: 1px dashed #aebfba;
  border-radius: 8px;
  background: var(--surface);
}

.reviews-empty strong {
  display: block;
  font-size: 22px;
}

.reviews-empty p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.state-panel strong {
  font-size: 24px;
}

.state-panel p {
  color: var(--muted);
}

.loading-state {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.loading-state span {
  width: 32px;
  height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.direction-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  min-height: 430px;
  background: var(--surface);
}

.direction-hero > img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.direction-hero > div {
  align-self: center;
  padding: clamp(30px, 6vw, 78px);
}

.direction-hero > div > span {
  display: inline-block;
  margin-top: 22px;
  color: var(--teal-dark);
  font-weight: 800;
}

.disclaimer {
  margin-top: 38px;
  padding: 18px 20px;
  border-left: 4px solid var(--gold);
  background: #fff8eb;
  color: #5a4a32;
  line-height: 1.55;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 34px;
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
}

.product-main {
  min-width: 0;
}

.product-cover {
  min-height: 420px;
  display: grid;
  place-items: center;
  margin-bottom: 30px;
  border-radius: 8px;
  color: white;
  background-position: center;
  background-size: cover;
}

.product-cover > span {
  align-self: start;
  margin-top: -120px;
  font-weight: 700;
}

.play {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  padding-left: 5px;
  border: 0;
  border-radius: 50%;
  background: white;
  color: var(--teal-dark);
  font-size: 28px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.play.small {
  width: 54px;
  height: 54px;
  font-size: 18px;
}

.module {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.module span {
  color: var(--teal-dark);
  font-weight: 800;
}

.module em {
  color: var(--muted);
  font-style: normal;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.detail-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.detail-card h2 {
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.similar-section {
  margin-top: 34px;
}

.side-panel,
.panel,
.metric,
.studio-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.side-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
}

.price {
  display: block;
  margin: 8px 0;
  font-size: 38px;
}

.facts {
  display: grid;
  gap: 7px;
}

.facts dt {
  color: var(--muted);
  font-size: 13px;
}

.facts dd {
  margin: 0 0 10px;
  font-weight: 700;
  line-height: 1.4;
}

.timeline {
  margin-top: 28px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item time {
  color: var(--teal-dark);
  font-weight: 800;
}

.timeline-item span {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.timeline-item h2 {
  margin: 5px 0;
  font-size: 24px;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
}

.specialist-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
}

.specialist-card {
  position: relative;
  padding: 24px;
}

.specialist-card > span {
  position: absolute;
  top: 22px;
  right: 22px;
  color: #9aaba5;
  font-weight: 800;
}

.specialist-monogram {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 30px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--teal-dark);
  font-size: 24px;
  font-weight: 800;
}

.mini-list {
  display: grid;
  gap: 14px;
}

.mini-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.mini-row strong,
.mini-row p,
.mini-row em {
  display: block;
  margin: 0;
}

.mini-row p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.5;
}

.mini-row em {
  margin-top: 7px;
  color: var(--teal-dark);
  font-style: normal;
  font-weight: 700;
}

.specialist-card h2 {
  font-size: 23px;
}

.specialist-card p {
  min-height: 48px;
  color: #44504b;
  line-height: 1.5;
}

.specialist-card em {
  display: block;
  min-height: 42px;
  font-size: 13px;
}

.trust-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-card {
  min-height: 230px;
  padding: 24px;
  text-align: left;
  cursor: pointer;
}

.trust-card > span {
  color: var(--teal);
  font-weight: 800;
}

.trust-card strong {
  display: block;
  margin-top: 32px;
  font-size: 22px;
}

.trust-card p {
  color: var(--muted);
  line-height: 1.55;
}

.trust-card em {
  color: var(--teal-dark);
  font-style: normal;
  font-weight: 800;
}

.policy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.policy-main {
  min-width: 0;
}

.policy-sections {
  margin-top: 42px;
}

.policy-sections section {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.policy-sections section > span {
  color: var(--teal);
  font-weight: 800;
}

.policy-sections h2 {
  font-size: 25px;
}

.policy-sections p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.policy-nav {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 3px;
  align-self: start;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.policy-nav strong {
  margin-bottom: 10px;
}

.policy-nav a {
  padding: 9px 0;
  color: var(--muted);
  text-decoration: none;
}

.policy-nav a:hover,
.policy-nav a.selected {
  color: var(--teal-dark);
  font-weight: 700;
}

.page-head {
  margin-bottom: 24px;
}

.cabinet-nav {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.cabinet-nav button {
  padding: 10px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.cabinet-nav button.active {
  background: var(--teal);
  color: white;
}

.dashboard {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 540px;
  overflow: hidden;
  border-radius: 8px;
  background: #14231f;
}

.rail {
  padding: 24px;
  color: white;
}

.rail a {
  display: block;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
}

.dashboard-main {
  min-width: 0;
  padding: 24px;
  background: #f1f5f3;
}

.dashboard-main > .panel + .panel {
  margin-top: 18px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric,
.panel {
  padding: 18px;
}

.metric span,
.metric strong {
  display: block;
}

.metric span {
  color: var(--muted);
}

.metric strong {
  margin-top: 8px;
  font-size: 27px;
}

.pill {
  display: inline-block;
  margin: 6px 8px 6px 0;
  padding: 9px 12px;
  border-radius: 999px;
  background: #e6eeeb;
}

.auth-dialog {
  width: min(680px, calc(100vw - 32px));
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(10, 20, 16, 0.3);
}

.auth-dialog::backdrop {
  background: rgba(10, 20, 16, 0.66);
  backdrop-filter: blur(5px);
}

.auth-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.auth-dialog-head h2 {
  margin-bottom: 0;
  font-size: 30px;
}

.auth-dialog > p {
  color: var(--muted);
  line-height: 1.55;
}

.role-choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.role-choice > button {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f9f7;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.role-choice > button:hover {
  border-color: var(--teal);
  background: var(--sage);
}

.role-choice strong,
.role-choice span {
  display: block;
}

.role-choice strong {
  margin-bottom: 10px;
  font-size: 18px;
}

.role-choice span {
  color: var(--muted);
  line-height: 1.45;
}

.dashboard-loading {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
}

.dashboard-loading span {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.access-panel {
  max-width: 680px;
}

.access-panel h3 {
  margin: 0;
  font-size: 26px;
}

.access-panel > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.workspace-list,
.note-list {
  display: grid;
}

.workspace-item,
.compact-row,
.credential-row,
.review-row,
.audit-row,
.note-row {
  min-width: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.workspace-item {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 0.9fr) auto;
  gap: 18px;
  align-items: center;
}

.workspace-item h4,
.workspace-item p,
.compact-row p,
.credential-row p,
.review-row p,
.audit-row p,
.note-row p {
  margin: 5px 0 0;
}

.workspace-item h4 {
  font-size: 19px;
}

.workspace-item p,
.compact-row p,
.credential-row p,
.review-row p,
.audit-row p {
  color: var(--muted);
}

.learning-progress {
  display: grid;
  gap: 8px;
}

.learning-progress label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.learning-progress progress {
  width: 100%;
  height: 10px;
  accent-color: var(--teal);
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.status-chip {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.status-chip.warning {
  background: #fff1d8;
  color: #76551d;
}

.compact-row,
.credential-row,
.review-row,
.note-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.audit-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 14px;
}

.audit-row time {
  color: var(--teal-dark);
  font-weight: 800;
}

.note-row .icon-button {
  flex: 0 0 42px;
}

.inline-form,
.profile-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.inline-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.inline-ingest-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 130px auto;
  gap: 8px;
  margin-top: 10px;
}

.inline-timeline-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.timeline-track-row {
  display: grid;
  grid-template-columns: 70px 130px 130px;
  gap: 8px;
  align-items: center;
}

.timeline-track-row .track-label {
  font-size: 13px;
  color: var(--muted);
}

.inline-branding-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.inline-ingest-form input,
.inline-timeline-form input,
.inline-timeline-form select,
.inline-branding-form input[type="text"],
.inline-review-comment-form input,
.inline-review-comment-form select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
}

.inline-branding-form label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}

/* docs/DOMAIN_MODEL.md's Media section AudioTrack entity
   (docs/PHASE_5_IMPLEMENTATION.md slice 3, "Audio mix" / "Audio
   normalization"). */
.inline-audio-mix-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.inline-audio-mix-form .audio-mix-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
}

.inline-audio-mix-form input[type="number"] {
  width: 64px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
}

.inline-audio-mix-form label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}

/* docs/EDITOR_SPEC.md's Editor V2 "LUT" (docs/PHASE_5_IMPLEMENTATION.md
   slice 4) - a compact preset select plus an intensity number field,
   styled the same as the audio-mix form above. */
.inline-color-grade-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.inline-color-grade-form select {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
}

.inline-color-grade-form input[type="number"] {
  width: 64px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
}

/* docs/EDITOR_SPEC.md's Editor V2 "AI rough cut" (docs/PHASE_5_IMPLEMENTATION.md
   slice 5) - a compact list of pending/applied/rejected suggestions,
   each row reusing the existing .status-chip look from the render-job
   status display. */
.rough-cut-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.rough-cut-suggestion-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
}

/* docs/ROADMAP.md PHASE 5's "Translation and dubbing" bullet
   (docs/PHASE_5_IMPLEMENTATION.md slice 6) - same compact list/row
   layout as the rough-cut suggestions above, reused for both the
   translation request form and the two suggestion lists. */
.inline-translation-form,
.inline-dubbing-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.inline-translation-form select,
.inline-dubbing-form select {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
}

.inline-dubbing-form label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
}

.translations,
.dubbing-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.translation-row,
.dubbing-suggestion-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
}

/* docs/ROADMAP.md PHASE 5's last bullet, "Glossary and consent"
   (docs/PHASE_5_IMPLEMENTATION.md slice 7) - same compact list/row and
   inline-form layout as translation/dubbing above. Glossary is
   delete-only (no "pending" affordance); consent rows show an
   active/revoked status chip instead. */
.inline-glossary-form,
.inline-consent-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.inline-glossary-form input,
.inline-consent-form input,
.inline-glossary-form select,
.inline-consent-form select {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
}

.glossary-terms,
.consent-records {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.glossary-term-row,
.consent-record-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
}

/* docs/EDITOR_SPEC.md's "Review comments tied to timecode" - a compact
   feed of ReviewComment rows plus a shared add-comment form shape used
   by both the owner and specialist content-project cards
   (docs/PHASE_4_IMPLEMENTATION.md slice 7). A flex layout rather than a
   fixed grid on purpose: the specialist's form has no category select
   (that field is forced server-side), so the two forms have a different
   field count and a strict grid-template-columns would misalign one of
   them. */
.review-comments {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.review-comment {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.review-comment.resolved {
  opacity: 0.65;
}

.review-comment-meta {
  font-size: 12px;
  font-weight: 800;
  color: var(--teal-dark);
}

.review-comment p {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
}

.inline-review-comment-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.inline-review-comment-form input[name="timeMs"] {
  width: 120px;
}

.inline-review-comment-form input[name="text"] {
  flex: 1 1 220px;
  width: auto;
}

.inline-review-comment-form select {
  width: auto;
}

/* docs/EDITOR_SPEC.md's "Render job states" - a compact status line for
   the latest RenderJob plus its "advance to the next state" action
   (docs/PHASE_4_IMPLEMENTATION.md slice 8). */
.render-job {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

/* docs/EDITOR_SPEC.md's "QC checklist" from Editor V1 scope
   (docs/PHASE_4_IMPLEMENTATION.md slice 9). */
.qc-checklist-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
}

.qc-checklist-form label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}

.qc-checklist-form input[type="text"] {
  flex: 1 1 200px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
}

.qc-report {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.qc-report p {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
}

.owner-draft-form {
  grid-template-columns: minmax(0, 1fr) 190px auto;
}

.inline-form input,
.inline-form select,
.profile-form input,
.profile-form select,
.profile-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.profile-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.profile-form textarea {
  min-height: 130px;
  resize: vertical;
}

.profile-form .button {
  justify-self: start;
}

.empty-copy {
  color: var(--muted);
}

.error-panel {
  border-color: #d5a7a7;
}

.state-machines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.state-machines > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.state-machines strong {
  display: block;
  margin-bottom: 9px;
}

.state-machines ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}

.studio-preview {
  min-height: 380px;
  padding: 30px;
  color: white;
  background: #274a42;
}

.studio-preview span {
  color: #f0cf8d;
  font-weight: 800;
}

.studio-preview strong {
  display: block;
  margin: 12px 0;
  font-size: 34px;
}

.pipeline div,
.finance-table div {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
}

.pipeline div.done {
  border-color: var(--teal);
  color: var(--teal-dark);
  font-weight: 800;
}

.finance-table {
  max-width: 780px;
}

.finance-table div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.note {
  color: var(--muted);
}

.footer {
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) repeat(3, minmax(150px, 1fr));
  gap: 34px;
  padding: 46px clamp(18px, 3.2vw, 52px) 28px;
  border-top: 1px solid var(--line);
  background: white;
  color: var(--muted);
}

.footer > div {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: var(--teal-dark);
}

.footer strong {
  color: var(--ink);
}

.footer-brand img {
  width: 240px;
  max-width: 100%;
}

.footer-brand p {
  max-width: 280px;
}

.footer-note {
  grid-column: 1 / -1;
  margin: 18px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.notice {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: min(460px, calc(100vw - 40px));
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #17211e;
  color: white;
  box-shadow: 0 18px 48px rgba(10, 20, 16, 0.28);
}

.notice[hidden] {
  display: none;
}

.notice button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .menu-button {
    display: block;
    justify-self: end;
  }

  .nav,
  .toolbar {
    display: none;
    grid-column: 1 / -1;
  }

  .topbar.menu-open .nav {
    display: grid;
    justify-content: stretch;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .topbar.menu-open .toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
  }

  .nav a {
    padding: 12px 0;
  }

  .search input {
    width: 100%;
  }

  #categoryGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .specialist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero-copy {
    width: 72%;
  }

  .two-column,
  .home-split,
  .direction-hero,
  .product-layout,
  .specialist-profile-layout,
  .policy-layout,
  .dashboard,
  .studio {
    grid-template-columns: 1fr;
  }

  .direction-hero > img {
    min-height: 330px;
    max-height: 430px;
  }

  .product-grid,
  .detail-grid,
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-panel,
  .policy-nav {
    position: static;
  }

  .policy-nav {
    order: -1;
    padding: 0 0 18px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .state-machines {
    grid-template-columns: 1fr;
  }

  .footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-item,
  .owner-draft-form {
    grid-template-columns: 1fr;
  }

  .item-actions {
    justify-content: start;
  }
}

@media (max-width: 680px) {
  .topbar {
    padding: 10px 14px;
  }

  .brand {
    width: min(205px, 67vw);
  }

  .topbar.menu-open .toolbar {
    grid-template-columns: 1fr 44px;
  }

  .toolbar .search {
    grid-column: 1 / -1;
  }

  .toolbar .button {
    width: 100%;
  }

  .hero {
    min-height: 660px;
    align-items: end;
    padding: 24px;
    background-position: 61% center;
  }

  .hero-copy {
    width: 100%;
  }

  .specialist-profile-heading {
    align-items: flex-start;
  }

  .specialist-monogram.large {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
    font-size: 22px;
  }

  .hero h1,
  .page-hero h1,
  .direction-hero h1,
  .policy-main > h1,
  .product-main > h1,
  .page-head h1 {
    font-size: 34px;
    line-height: 1.12;
    overflow-wrap: break-word;
  }

  .hero-copy > p,
  .page-hero p,
  .direction-hero p,
  .policy-main > .lead,
  .product-main > .lead {
    font-size: 16px;
  }

  .hero-benefits {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 26px;
  }

  .section-head,
  .catalog-tools {
    align-items: stretch;
    flex-direction: column;
  }

  #categoryGrid,
  .product-grid,
  .benefit-grid,
  .detail-grid,
  .specialist-grid,
  .trust-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 0;
  }

  .page-hero {
    min-height: 270px;
    padding: 28px 22px;
  }

  .direction-hero > img {
    min-height: 260px;
  }

  .direction-hero > div {
    padding: 28px 22px;
  }

  .product-cover {
    min-height: 290px;
  }

  .module,
  .mini-row,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .module span {
    display: none;
  }

  .timeline-item {
    gap: 12px;
  }

  .timeline-item .button {
    width: 100%;
  }

  .policy-sections section {
    grid-template-columns: 38px 1fr;
  }

  .finance-table div {
    align-items: start;
    flex-direction: column;
  }

  .footer {
    grid-template-columns: 1fr;
  }

  .notice {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }

  .role-choice,
  .inline-form,
  .inline-ingest-form,
  .inline-branding-form,
  .timeline-track-row {
    grid-template-columns: 1fr;
  }

  .role-choice > button {
    min-height: 0;
  }

  .compact-row,
  .credential-row,
  .review-row,
  .note-row {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-row .status-chip,
  .credential-row .status-chip,
  .review-row .status-chip {
    align-self: start;
  }
}

.analytics-consent-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.privacy-export-panel {
  border-color: rgba(29, 92, 77, 0.28);
}

.privacy-session-panel,
.privacy-request-panel {
  border-color: rgba(72, 73, 61, 0.22);
}

.operational-readiness-panel,
.owner-privacy-queue-panel {
  border-color: rgba(152, 89, 35, 0.28);
}

.support-ticket-panel,
.owner-support-queue-panel {
  border-color: rgba(49, 91, 127, 0.25);
}

.readiness-gate-row p {
  overflow-wrap: anywhere;
}

.chapter-set ol {
  display: grid;
  gap: 0.35rem;
  margin: 0.65rem 0;
  padding-left: 1.5rem;
}

.chapter-set time {
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.inline-chapter-form textarea {
  min-width: min(100%, 28rem);
}

.analytics-consent-panel h3 {
  margin-bottom: 6px;
}

.analytics-consent-panel p {
  max-width: 720px;
  margin: 0 0 12px;
}

.analytics-consent-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: 210px;
}

.analytics-event-row time {
  color: var(--muted);
  white-space: nowrap;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.dashboard-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--sage);
}

.dashboard-stat strong {
  font-size: 1.2em;
  color: var(--pine);
}

.dashboard-stat span {
  color: var(--muted);
  font-size: 0.85em;
}

.kpi-digest-insights {
  display: grid;
  gap: 6px;
  margin: 5px 0 0;
  padding: 0;
  list-style: none;
}

.kpi-digest-insights li {
  color: var(--muted);
}

.kpi-digest-insights li.kpi-digest-warning {
  color: #76551d;
  font-weight: 700;
}

@media (max-width: 680px) {
  .analytics-consent-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-consent-actions {
    justify-items: stretch;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
