/*
 * Hux Studio / MasterGo reference theme
 * Visual contract: flat ink, square geometry, thin rules, restrained red state.
 */

:root {
  color-scheme: dark;
  --background: #090909;
  --foreground: #f2f2f2;
  --card: #111111;
  --card-foreground: #f2f2f2;
  --popover: #111111;
  --popover-foreground: #f2f2f2;
  --primary: #f2f2f2;
  --primary-foreground: #090909;
  --secondary: #181818;
  --secondary-foreground: #dedede;
  --muted: #141414;
  --muted-foreground: #989898;
  --accent: #ff4d4d;
  --accent-foreground: #090909;
  --brand: #ff4d4d;
  --brand-strong: #ff6868;
  --brand-muted: rgb(255 77 77 / 10%);
  --success: #a9c5b5;
  --warning: #d6a34b;
  --border: #292929;
  --border-strong: #3b3b3b;
  --input: #343434;
  --ring: #ff4d4d;
  --radius: 0px;
  --sidebar-width: 0px;
  --content-max: 1540px;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --nav-height: 96px;
  --subnav-height: 74px;
  font-family: Inter, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
  background: var(--background);
  scrollbar-color: #3a3a3a #0d0d0d;
}

body {
  background:
    linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgb(255 255 255 / 2.2%) 25%, transparent calc(25% + 1px)),
    linear-gradient(90deg, transparent 0, transparent calc(50% - 1px), rgb(255 255 255 / 2.2%) 50%, transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent 0, transparent calc(75% - 1px), rgb(255 255 255 / 2.2%) 75%, transparent calc(75% + 1px)),
    var(--background);
  color: var(--foreground);
  font-feature-settings: "tnum" 1, "ss01" 1;
}

::selection {
  background: var(--brand);
  color: #090909;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 1px solid var(--brand);
  outline-offset: 3px;
}

.site-shell {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Horizontal archive navigation */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 260px;
  grid-template-rows: var(--nav-height);
  width: 100%;
  height: var(--nav-height);
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: #111111;
  box-shadow: none;
  backdrop-filter: none;
}

.brand {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  height: var(--nav-height);
  padding: 0 30px;
  border: 0;
  border-right: 1px solid var(--border);
  color: var(--foreground);
}

.brand-mark,
.footer-mark {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
  font-size: 0;
}

.brand-mark::before,
.brand-mark::after,
.footer-mark::before,
.footer-mark::after {
  position: absolute;
  inset: 6px auto 6px 3px;
  width: 25px;
  background: #050505;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  content: "";
}

.brand-mark::after,
.footer-mark::after {
  right: 2px;
  left: auto;
  background: linear-gradient(180deg, #777777, #1b1b1b);
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.brand-copy {
  gap: 3px;
}

.brand-name {
  font-size: 20px;
  font-weight: 620;
  letter-spacing: 0.01em;
}

.product-name {
  color: #777777;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand .beta {
  display: none;
}

.sidebar-body {
  min-width: 0;
  height: var(--nav-height);
  padding: 0;
}

.main-nav {
  display: flex;
  height: 100%;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-label {
  display: none;
}

.nav-link {
  position: relative;
  display: inline-flex;
  min-width: 148px;
  min-height: var(--nav-height);
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 26px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: #9a9a9a;
  font-size: 14px;
  font-weight: 680;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 180ms ease, background-color 180ms ease;
}

.nav-link::after {
  position: absolute;
  right: 24px;
  bottom: -1px;
  left: 24px;
  height: 2px;
  background: var(--brand);
  content: "";
  opacity: 0;
  transform: scaleX(0.25);
  transform-origin: center;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link svg {
  display: none;
}

.nav-link:hover {
  background: #151515;
  color: #f2f2f2;
}

.nav-link.active {
  background: #151515;
  color: #f2f2f2;
  box-shadow: none;
}

.nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-count {
  min-width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.nav-count::before {
  content: "/";
  margin-right: 4px;
  color: #565656;
}

.sidebar-footer {
  display: flex;
  height: var(--nav-height);
  align-items: stretch;
  align-self: auto;
}

.source-status {
  display: none;
}

.user-menu {
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  gap: 10px;
  width: 100%;
  min-height: var(--nav-height);
  padding: 0 24px;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  color: #8e8e8e;
}

.user-menu:hover {
  border-color: var(--border);
  background: #151515;
}

.avatar,
.mini-avatar,
.detail-btn,
.favorite-btn,
.status-dot {
  border-radius: 0;
}

.avatar {
  width: 38px;
  height: 38px;
  border: 1px solid #3a3a3a;
  background: #191919;
  color: var(--brand);
}

.user-copy strong {
  font-size: 14px;
  font-weight: 650;
}

.user-copy small {
  color: #676767;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Page masthead */
.workspace {
  width: 100%;
  min-height: 100vh;
  margin: var(--nav-height) 0 0;
}

.workspace-header {
  position: sticky;
  top: var(--nav-height);
  z-index: 35;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  height: var(--subnav-height);
  padding: 0 clamp(24px, 4vw, 72px);
  border-bottom: 1px solid var(--border);
  background: rgb(9 9 9 / 96%);
  backdrop-filter: none;
}

.workspace-title h1 {
  color: #b7b7b7;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.view-switch {
  height: 100%;
  gap: 0;
}

.view-tab {
  position: relative;
  min-height: 100%;
  gap: 10px;
  padding: 0 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #777777;
  font-size: 14px;
  font-weight: 680;
  letter-spacing: 0.05em;
}

.view-tab::after {
  position: absolute;
  right: 22px;
  bottom: -1px;
  left: 22px;
  height: 2px;
  background: var(--brand);
  content: "";
  opacity: 0;
  transform: scaleX(0.3);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.view-tab:hover {
  color: #dedede;
}

.view-tab.active {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #f2f2f2;
}

.view-tab.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.view-tab svg {
  width: 19px;
  height: 19px;
  color: currentColor;
}

.view-count,
.view-tab.active .view-count {
  min-width: auto;
  min-height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

.button,
.upload-button,
.icon-button,
.reader-back,
.reader-action {
  border-radius: 0;
  box-shadow: none;
}

.badge,
.quickstart li::before {
  border-radius: 0;
}

.quickstart li::before {
  background: var(--brand-muted);
  color: var(--brand);
}

.button {
  min-height: 38px;
  border: 1px solid #3b3b3b;
  background: #101010;
  color: #d8d8d8;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.button:hover {
  border-color: var(--brand);
  background: #151515;
  color: #ffffff;
  transform: none;
}

.button.primary,
.upload-button {
  border-color: #f2f2f2;
  background: #f2f2f2;
  color: #090909;
}

.button.primary:hover,
.upload-button:hover {
  border-color: var(--brand);
  background: var(--brand);
  color: #090909;
}

.upload-button {
  grid-column: 3;
  justify-self: end;
  min-height: 42px;
  padding-inline: 20px;
  font-size: 13px;
}

.workspace-content {
  width: min(var(--content-max), calc(100% - clamp(48px, 9vw, 156px)));
  margin: 0 auto;
  padding: clamp(54px, 6vw, 92px) 0 84px;
}

.workspace.page-assets .workspace-content {
  padding-top: 48px;
}

.library-section {
  padding-top: 0;
}

.section-kicker {
  color: var(--brand);
  font-family: "Arial Narrow", Inter, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

/* Archive overview */
.dashboard-section {
  gap: 34px;
}

.dashboard-heading {
  position: relative;
  align-items: end;
  min-height: 150px;
  padding: 0 0 34px 26px;
  border-bottom: 1px solid var(--border);
}

.dashboard-heading::before {
  position: absolute;
  top: 3px;
  bottom: 34px;
  left: 0;
  width: 2px;
  background: var(--brand);
  content: "";
}

.dashboard-heading > div {
  gap: 12px;
}

.dashboard-heading h2 {
  max-width: 760px;
  color: #eeeeee;
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 480;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.dashboard-heading p {
  max-width: 690px;
  color: #797979;
  font-size: 13px;
  line-height: 1.8;
}

.dashboard-asset-link {
  margin-bottom: 2px;
  border-color: #3d3d3d;
}

.dashboard-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  background: #0f0f0f;
}

.dashboard-metrics article,
.dashboard-metrics article:first-child,
.dashboard-metrics article:last-child {
  gap: 7px;
  min-height: 154px;
  padding: 24px 24px 20px;
  border: 0;
  border-right: 1px solid var(--border);
  background: #101010;
}

.dashboard-metrics article:last-child {
  border-right: 0;
}

.dashboard-metrics article::before {
  position: absolute;
  top: -1px;
  left: 24px;
  width: 26px;
  height: 2px;
  background: #4a4a4a;
  content: "";
  transition: width 220ms ease, background-color 180ms ease;
}

.dashboard-metrics article:hover::before {
  width: 64px;
  background: var(--brand);
}

.dashboard-metrics .metric-icon {
  top: 22px;
  right: 22px;
  width: 30px;
  height: 30px;
  border: 1px solid #303030;
  border-radius: 0;
  background: transparent;
  color: #686868;
}

.dashboard-metrics span {
  color: #858585;
  font-size: 11px;
  font-weight: 560;
}

.dashboard-metrics strong {
  margin-top: auto;
  color: #ededed;
  font-family: "Arial Narrow", Inter, sans-serif;
  font-size: 44px;
  font-weight: 430;
  letter-spacing: -0.04em;
}

.dashboard-metrics small {
  color: #5f5f5f;
  font-size: 10px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.85fr);
  gap: 0;
  border: 1px solid var(--border);
  background: var(--border);
}

.dashboard-panel {
  border: 0;
  border-radius: 0;
  background: #101010;
}

.dashboard-panel + .dashboard-panel {
  border-left: 1px solid var(--border);
}

.panel-heading {
  min-height: 82px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: #121212;
}

.panel-heading h3 {
  font-size: 17px;
  font-weight: 560;
}

.panel-note {
  color: #5e5e5e;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.recent-item {
  position: relative;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background-color 160ms ease, color 160ms ease;
}

.recent-item::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--brand);
  content: "";
  opacity: 0;
  transform: scaleY(0.3);
  transition: opacity 160ms ease, transform 200ms ease;
}

.recent-item:hover {
  background: #151515;
}

.recent-item:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.recent-icon {
  width: 34px;
  height: 34px;
  border: 1px solid #303030;
  border-radius: 0;
  background: #151515;
  color: #777777;
}

.recent-copy strong {
  font-size: 12px;
  font-weight: 590;
}

.recent-copy small,
.recent-item time {
  color: #616161;
  font-size: 9px;
}

.category-overview {
  padding: 8px 20px 12px;
}

.category-row {
  grid-template-columns: minmax(100px, auto) minmax(80px, 1fr) 26px;
  min-height: 56px;
  border-bottom: 1px solid var(--border);
}

.category-row-label strong {
  font-size: 11px;
  font-weight: 590;
}

.category-track {
  height: 2px;
  border-radius: 0;
  background: #252525;
}

.category-track i {
  border-radius: 0;
  background: var(--brand);
  opacity: 0.85;
  transform-origin: left;
  transition: filter 160ms ease, transform 200ms ease;
}

.category-row:hover .category-track i {
  filter: brightness(1.2);
  transform: scaleY(2);
}

.category-total {
  color: #747474;
  font-size: 10px;
}

.dashboard-source {
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 2fr);
  gap: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #0f0f0f;
}

.source-title {
  align-self: stretch;
  padding: 24px;
  border-right: 1px solid var(--border);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--brand);
  box-shadow: none;
}

.status-dot.stale {
  background: var(--warning);
  box-shadow: none;
}

.source-title strong {
  font-size: 11px;
  font-weight: 580;
}

.dashboard-source dl {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.dashboard-source dl div {
  justify-content: center;
  padding: 20px 22px;
  border-right: 1px solid var(--border);
}

.dashboard-source dl div:last-child {
  border-right: 0;
}

.dashboard-source dt {
  color: #595959;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-source dd {
  color: #a7a7a7;
  font-size: 10px;
}

/* Asset discovery controls */
.asset-toolbar {
  position: relative;
  top: auto;
  bottom: auto;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 68px;
  gap: 0;
  margin: 0;
  border: 1px solid var(--border);
  background: #101010;
}

.asset-toolbar .search-wrap {
  width: 100%;
  height: 68px;
  padding: 0 22px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: #101010;
  box-shadow: none;
}

.asset-toolbar .search-wrap:hover,
.asset-toolbar .search-wrap:focus-within {
  border-color: var(--border);
  background: #141414;
  box-shadow: inset 2px 0 0 var(--brand);
}

.search-wrap svg {
  width: 20px;
  height: 20px;
  color: #686868;
}

.asset-toolbar .search-wrap input {
  color: #eeeeee;
  font-size: 16px;
  font-weight: 560;
}

.search-wrap input::placeholder {
  color: #666666;
}

.filter-type-group {
  min-width: 0;
}

.category-pills {
  height: 100%;
  gap: 0;
  padding: 0;
}

.pill {
  position: relative;
  min-height: 66px;
  padding: 0 20px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: #777777;
  font-size: 14px;
  font-weight: 680;
  letter-spacing: 0.02em;
  box-shadow: none;
}

.pill::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 2px;
  background: var(--brand);
  content: "";
  opacity: 0;
  transform: scaleX(0.25);
  transition: opacity 160ms ease, transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.pill:hover {
  border-color: var(--border);
  background: #141414;
  color: #e2e2e2;
}

.pill.active {
  border: 0;
  border-right: 1px solid var(--border);
  background: #141414;
  color: #ffffff;
  box-shadow: none;
}

.pill.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.pill .icon {
  width: 18px;
  height: 18px;
  color: #636363;
}

.pill.active .icon {
  color: var(--brand);
}

.pill-count,
.pill.active .pill-count {
  min-width: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #5f5f5f;
  font-size: 12px;
  font-weight: 700;
}

.pill.active .pill-count {
  color: var(--brand);
}

.filter-secondary-group {
  width: 100%;
  margin: -1px 0 0;
  padding: 11px 0;
  border: 1px solid var(--border);
  background: #0e0e0e;
}

.secondary-pills {
  min-height: 44px;
  height: auto;
  padding: 0;
  border: 0;
}

.secondary-pill {
  min-height: 44px;
  padding-inline: 22px;
  font-size: 14px;
}

.results-meta {
  min-height: 60px;
  margin: 0;
  padding: 0 18px 0 22px;
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: #0d0d0d;
}

.results-meta p {
  color: #666666;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.results-meta .button {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
  color: #737373;
  font-size: 13px;
}

.results-meta .button svg {
  width: 16px;
  height: 16px;
  color: currentColor;
}

/* Editorial asset grid */
.asset-grid,
.skeleton-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.asset-grid {
  padding: 0;
  border: 0;
  background: #202020;
}

.asset-card,
.skeleton-grid span {
  aspect-ratio: 3 / 2;
  border: 0;
  border-radius: 0;
  background: #101010;
  box-shadow: none;
}

.asset-card {
  animation: hux-card-in 520ms calc(min(var(--card-index, 0), 9) * 45ms) cubic-bezier(0.22, 1, 0.36, 1) backwards;
  transition: background-color 180ms ease;
}

.asset-grid.suppress-entry-motion .asset-card {
  animation: none;
}

.asset-card::after {
  position: absolute;
  z-index: 14;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--brand);
  content: "";
  opacity: 0;
  transform: scaleX(0.2);
  transform-origin: left;
  transition: opacity 180ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.asset-card:hover,
.asset-card:focus-visible {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.asset-card:hover::after,
.asset-card:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.skill-card-visual {
  background: #111111;
}

.skill-card-noise {
  z-index: 4;
  background-image: linear-gradient(90deg, transparent 49.8%, rgb(255 255 255 / 7%) 50%, transparent 50.2%);
  background-size: 48px 100%;
  mask-image: linear-gradient(180deg, black, transparent 90%);
  opacity: 0.18;
}

.cover-purple,
.cover-blue,
.cover-cyan,
.cover-green,
.cover-pink,
.cover-orange,
.cover-neutral {
  --skill-a: #242424;
  --skill-b: #101010;
  --skill-glow: transparent;
  --skill-ring: var(--border);
  --skill-ring-hover: var(--brand);
}

.asset-cover-media {
  inset: -1px;
  background: #111111;
}

.asset-cover-media::before {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 52%;
  background: rgb(9 9 9 / 18%);
  content: "";
  pointer-events: none;
  -webkit-backdrop-filter: blur(9px) saturate(0.82);
  backdrop-filter: blur(9px) saturate(0.82);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgb(0 0 0 / 32%) 28%, black 68%);
  mask-image: linear-gradient(180deg, transparent 0%, rgb(0 0 0 / 32%) 28%, black 68%);
}

.asset-cover-media::after {
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgb(9 9 9 / 14%) 0%,
    rgb(9 9 9 / 22%) 45%,
    rgb(9 9 9 / 58%) 72%,
    rgb(9 9 9 / 96%) 100%
  );
}

.asset-cover-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: 0.82;
  filter: grayscale(0.22) saturate(0.8) contrast(0.96) brightness(0.76);
  transform: scale(1.01);
  transition: opacity 260ms ease, filter 340ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.asset-cover-media.top img {
  object-position: 50% 12%;
}

.asset-card:hover .asset-cover-media img,
.asset-card:focus-within .asset-cover-media img {
  opacity: 0.95;
  filter: grayscale(0.05) saturate(0.96) contrast(1) brightness(0.94);
  transform: scale(1.025);
}

.visual {
  filter: grayscale(0.55);
  opacity: 0.72;
}

.visual-chart .chart-panel,
.visual-doc .doc-card,
.visual-prompt .bubble,
.wire-cube,
.terminal,
.wand {
  border-radius: 0;
  box-shadow: none;
}

.skill-topline {
  inset: 16px 66px auto 16px;
  opacity: 1;
  transform: none;
}

.skill-card .badge {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #555555;
  border-radius: 0;
  background: #151515;
  color: #f0f0f0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 1;
  backdrop-filter: none;
}

.level-l1,
.level-l2,
.level-l3 {
  color: #f0f0f0 !important;
}

.favorite-btn {
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border: 1px solid #454545;
  border-radius: 0;
  background: #151515;
  color: #c0c0c0;
  opacity: 1;
  backdrop-filter: none;
}

.favorite-btn:hover,
.asset-card:focus-within .favorite-btn {
  border-color: var(--brand);
  background: #101010;
  color: #ffffff;
  transform: none;
}

.favorite-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #090909;
}

.skill-footer,
.asset-card:hover .skill-footer,
.asset-card:focus-within .skill-footer {
  min-height: 124px;
  padding: 42px 62px 20px 20px;
  background: linear-gradient(180deg, transparent, rgb(9 9 9 / 72%) 36%, rgb(9 9 9 / 98%) 72%);
}

.skill-owner {
  gap: 7px;
}

.card-category,
.asset-card:hover .card-category,
.asset-card:focus-within .card-category {
  display: inline-flex;
  width: fit-content;
  max-height: none;
  align-items: center;
  justify-self: start;
  margin-bottom: 0;
  padding: 5px 9px 5px 10px;
  border-left: 3px solid var(--brand);
  background: #0d0d0d;
  color: var(--brand);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  line-height: 1;
  opacity: 1;
  transform: none;
  text-transform: uppercase;
}

.skill-owner-copy strong {
  color: #f0f0f0;
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.015em;
  line-height: 1.28;
}

.skill-owner-copy small,
.asset-card:hover .skill-owner-copy small,
.asset-card:focus-within .skill-owner-copy small {
  max-height: 18px;
  margin-top: 6px;
  color: #b0b0b0;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.4;
  opacity: 1;
  transform: none;
}

.skill-hover-panel,
.asset-card:hover .skill-hover-panel,
.asset-card:focus-within .skill-hover-panel {
  display: none;
}

.detail-btn {
  right: 18px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  border: 1px solid #414141;
  border-radius: 0;
  background: #151515;
  color: #c4c4c4;
  backdrop-filter: none;
}

.detail-btn:hover,
.asset-card:hover .detail-btn,
.asset-card:focus-within .detail-btn {
  border-color: var(--brand);
  background: var(--brand);
  color: #090909;
  transform: none;
}

.skeleton-grid span {
  background: linear-gradient(90deg, #111111 20%, #1c1c1c 48%, #111111 76%);
  background-size: 240% 100%;
}

.empty-state {
  border: 1px solid var(--border);
  border-radius: 0;
  background: #101010;
}

.empty-state .empty-retry {
  min-width: 128px;
  margin-top: 24px;
  border-color: var(--brand);
  color: #f4f4f4;
}

.empty-state .empty-retry:hover,
.empty-state .empty-retry:focus-visible {
  background: var(--brand);
  color: #090909;
}

/* Drawers, dialogs and longform reader */
.sheet-backdrop {
  background: rgb(0 0 0 / 72%);
  backdrop-filter: none;
}

.asset-sheet {
  width: min(720px, 100vw);
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: #0d0d0d;
  box-shadow: none;
}

.sheet-content,
.sheet-stack,
.sheet-hero,
.sheet-block,
.sheet-grid .sheet-block,
.quickstart-block pre,
.tag-list span,
.portal-dialog,
.portal-dialog-shell,
.portal-steps li,
.portal-guide-grid section,
.workflow-article-hero,
.workflow-step-flow,
.workflow-step-flow li,
.workflow-platform-grid article,
.workflow-toc,
.workflow-source-note,
.workflow-callout,
.workflow-resource,
.markdown-media img,
.markdown-video-figure img,
.markdown-video-figure a,
.markdown-video-play,
.reader-taxonomy span,
.reader-taxonomy strong,
.workflow-article-meta .badge,
.workflow-step-number,
.workflow-article pre,
.workflow-article code {
  border-radius: 0;
  box-shadow: none;
}

.sheet-hero {
  border: 1px solid var(--border);
  background: #111111;
}

.sheet-hero::after,
.workflow-article-hero::after {
  background: linear-gradient(180deg, transparent 0%, rgb(9 9 9 / 84%) 100%);
}

.sheet-taxonomy,
.workflow-article-type {
  color: var(--brand);
}

.sheet-block,
.sheet-grid .sheet-block {
  border-color: var(--border);
  background: #101010;
}

.sheet-actions {
  border-color: var(--border);
  background: #0d0d0d;
  backdrop-filter: none;
}

.meta-path-link {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  color: #d8d8d8;
  text-decoration: none;
}

.meta-path-link code {
  overflow-wrap: anywhere;
}

.meta-path-link svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--brand);
}

.meta-path-link:hover,
.meta-path-link:focus-visible {
  color: #ffffff;
  outline: 1px solid var(--brand);
  outline-offset: 4px;
}

.portal-dialog {
  border: 1px solid var(--border-strong);
  background: #0d0d0d;
}

.portal-dialog::backdrop {
  background: rgb(0 0 0 / 78%);
  backdrop-filter: none;
}

.portal-dialog-header {
  border-color: var(--border);
  background: #111111;
}

.portal-steps li,
.portal-guide-grid section {
  border-color: var(--border);
  background: #111111;
}

.portal-section-label {
  margin: 18px 0 10px;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.portal-platform-map strong {
  color: #f2f2f2;
}

.workflow-reader {
  inset: var(--nav-height) 0 0;
  padding-left: 0;
  background: #090909;
}

.workflow-reader-bar {
  border-color: var(--border);
  background: #0d0d0d;
  backdrop-filter: none;
}

.workflow-article {
  width: min(1120px, calc(100% - 64px));
}

.workflow-article-hero,
.workflow-step-flow,
.workflow-platform-grid article,
.workflow-toc,
.workflow-source-note,
.workflow-callout,
.workflow-resource {
  border-color: var(--border);
  background: #101010;
}

.workflow-step-number,
.workflow-source-link:hover,
.workflow-resource a:hover {
  color: var(--brand);
}

.toast {
  border: 1px solid var(--brand);
  border-radius: 0;
  background: #101010;
  box-shadow: none;
  color: #eeeeee;
}

/* Footer follows the reference document's wide, quiet ending panel. */
.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(200px, 0.55fr) minmax(200px, 0.55fr);
  gap: 0;
  min-height: 280px;
  margin-top: 80px;
  border: 1px solid var(--border);
  background: #0d0d0d;
}

.footer-brand,
.footer-column {
  padding: 42px;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  border-right: 1px solid var(--border);
}

.footer-mark {
  flex: 0 0 auto;
}

.footer-brand > div {
  display: grid;
  gap: 20px;
}

.footer-brand strong {
  color: #dcdcdc;
  font-size: 25px;
  font-weight: 450;
}

.footer-brand p {
  max-width: 430px;
  margin: 0;
  color: #666666;
  font-size: 12px;
  line-height: 1.8;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid var(--border);
}

.footer-column:last-child {
  border-right: 0;
}

.footer-column > span {
  margin-bottom: 12px;
  color: #555555;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.footer-column a {
  width: fit-content;
  color: #adadad;
  font-size: 11px;
  text-decoration: none;
  transition: color 160ms ease;
}

.footer-column a:hover {
  color: var(--brand);
}

.footer-column small {
  color: #575757;
  font-size: 9px;
}

/* Small functional copy stays understated while meeting readable contrast. */
.product-name,
.dashboard-heading p,
.dashboard-metrics small,
.panel-note,
.recent-copy small,
.recent-item time,
.dashboard-source dt,
.search-wrap input::placeholder,
.pill,
.results-meta p,
.footer-brand p,
.footer-column > span,
.footer-column small {
  color: #858585;
}

.view-entering {
  animation: hux-panel-reveal 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dashboard-heading,
.dashboard-metrics,
.dashboard-grid,
.dashboard-source {
  animation: hux-reveal 520ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.dashboard-metrics { animation-delay: 70ms; }
.dashboard-grid { animation-delay: 130ms; }
.dashboard-source { animation-delay: 190ms; }

@keyframes hux-reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hux-card-in {
  from {
    opacity: 0;
    clip-path: inset(0 0 18% 0);
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
  }
}

@keyframes hux-panel-reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1760px) {
  .asset-grid,
  .skeleton-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1240px) {
  :root {
    --nav-height: 78px;
  }

  .topbar {
    grid-template-columns: 236px minmax(0, 1fr) 190px;
  }

  .brand {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 0 20px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .nav-link {
    min-width: 104px;
    padding: 0 14px;
    font-size: 10px;
  }

  .user-menu {
    padding: 0 18px;
  }

  .workspace-content {
    width: min(1080px, calc(100% - 48px));
  }

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

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

  .dashboard-source dl div:nth-child(2) {
    border-right: 0;
  }

  .dashboard-source dl div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 980px) {
  :root {
    --nav-height: 70px;
    --subnav-height: 60px;
  }

  .topbar {
    position: fixed;
    inset: 0 0 auto;
    grid-template-columns: 210px minmax(0, 1fr) 76px;
    grid-template-rows: var(--nav-height);
    width: 100%;
    height: var(--nav-height);
    padding: 0;
  }

  .brand {
    display: grid;
    height: var(--nav-height);
  }

  .brand-copy {
    display: grid;
  }

  .sidebar-body {
    height: var(--nav-height);
    padding: 0;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .main-nav .nav-link:nth-of-type(n + 3) {
    display: none;
  }

  .nav-link {
    min-height: var(--nav-height);
  }

  .sidebar-footer {
    display: flex;
    height: var(--nav-height);
  }

  .user-menu {
    grid-template-columns: 1fr;
    min-height: var(--nav-height);
    padding: 0;
    place-items: center;
  }

  .user-copy,
  .user-menu svg {
    display: none;
  }

  .workspace {
    margin-top: var(--nav-height);
    margin-left: 0;
  }

  .workspace-header {
    top: var(--nav-height);
    height: var(--subnav-height);
    padding-inline: 24px;
  }

  .workspace-content {
    width: min(900px, calc(100% - 40px));
    padding-top: 54px;
  }

  .dashboard-heading h2 {
    font-size: clamp(42px, 7vw, 62px);
  }

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

  .dashboard-panel + .dashboard-panel {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .dashboard-source {
    grid-template-columns: 1fr;
  }

  .source-title {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .asset-toolbar {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .pill {
    padding: 0 12px;
  }

  .workflow-reader {
    inset: var(--nav-height) 0 0;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 720px) {
  :root {
    --nav-height: 64px;
    --subnav-height: 56px;
  }

  body {
    background: var(--background);
  }

  .topbar {
    display: grid;
    grid-template-columns: 156px minmax(0, 1fr);
  }

  .brand {
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 8px;
    padding: 0 12px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .brand-mark::before,
  .brand-mark::after {
    inset-block: 4px;
    width: 17px;
  }

  .brand-mark::after {
    right: 0;
    left: auto;
  }

  .brand-name {
    font-size: 12px;
  }

  .product-name {
    display: none;
  }

  .sidebar-body {
    min-width: 0;
  }

  .main-nav {
    justify-content: stretch;
  }

  .nav-link {
    min-width: 50%;
    min-height: var(--nav-height);
    padding: 0 8px;
    font-size: 9px;
  }

  .nav-count {
    display: inline;
  }

  .sidebar-footer {
    display: none;
  }

  .workspace.page-home .workspace-header,
  .workspace.page-assets .workspace-header {
    display: grid;
  }

  .workspace-header {
    top: var(--nav-height);
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 12px;
  }

  .workspace-title {
    display: flex;
  }

  .workspace-title h1 {
    max-width: 150px;
    font-size: 8px;
  }

  .view-switch {
    position: static;
  }

  .workspace.page-assets .workspace-title,
  .workspace.page-home .view-switch {
    display: none;
  }

  .workspace.page-assets .view-switch {
    grid-column: 1;
    justify-self: start;
  }

  .view-tab {
    padding: 0 11px;
    font-size: 9px;
  }

  .view-tab svg {
    display: none;
  }

  .upload-button {
    grid-column: 2;
    width: auto;
    min-height: 32px;
    padding: 0 10px;
    color: #090909;
    font-size: 9px;
  }

  .upload-button svg {
    width: 13px;
    height: 13px;
    color: currentColor;
  }

  .workspace-content {
    width: calc(100% - 24px);
    padding: 34px 0 52px;
  }

  .library-section {
    padding-top: 0;
  }

  .dashboard-heading {
    min-height: 132px;
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
    padding: 0 0 26px 18px;
  }

  .dashboard-heading::before {
    bottom: 26px;
  }

  .dashboard-heading h2 {
    font-size: 38px;
  }

  .dashboard-heading p {
    font-size: 11px;
  }

  .dashboard-asset-link {
    margin: 0;
  }

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

  .dashboard-metrics article,
  .dashboard-metrics article:first-child,
  .dashboard-metrics article:last-child {
    min-height: 132px;
    padding: 18px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .dashboard-metrics article:nth-child(2n) {
    border-right: 0;
  }

  .dashboard-metrics article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .dashboard-metrics .metric-icon {
    top: 16px;
    right: 16px;
    width: 26px;
    height: 26px;
  }

  .dashboard-metrics strong {
    font-size: 35px;
  }

  .dashboard-metrics small {
    white-space: normal;
  }

  .recent-item {
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 12px 14px;
  }

  .recent-icon {
    width: 30px;
    height: 30px;
  }

  .recent-item time {
    display: none;
  }

  .category-row {
    grid-template-columns: minmax(86px, auto) minmax(54px, 1fr) 20px;
    gap: 8px;
  }

  .dashboard-source dl {
    grid-template-columns: 1fr;
  }

  .dashboard-source dl div,
  .dashboard-source dl div:nth-child(2),
  .dashboard-source dl div:nth-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .dashboard-source dl div:last-child {
    border-bottom: 0;
  }

  .asset-toolbar {
    grid-template-columns: 1fr;
    border-bottom: 0;
  }

  .asset-toolbar .search-wrap {
    height: 52px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .category-pills {
    min-height: 52px;
  }

  .pill {
    min-height: 52px;
  }

  .results-meta {
    min-height: 42px;
  }

  .results-meta .button {
    width: 28px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .results-meta .button svg {
    color: #777777;
  }

  .asset-grid,
  .skeleton-grid {
    grid-template-columns: 1fr;
  }

  .asset-card,
  .skeleton-grid span {
    aspect-ratio: 1.42 / 1;
  }

  .skill-footer,
  .asset-card:hover .skill-footer,
  .asset-card:focus-within .skill-footer {
    min-height: 94px;
  }

  .asset-sheet {
    width: 100vw;
  }

  .workflow-reader {
    inset: var(--nav-height) 0 0;
  }

  .workflow-article {
    width: calc(100% - 24px);
  }

  .site-footer {
    grid-template-columns: 1fr;
    min-height: auto;
    margin-top: 50px;
  }

  .footer-brand,
  .footer-column {
    padding: 28px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .footer-column:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 420px) {
  .topbar {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .brand {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .brand-mark {
    width: 26px;
    height: 26px;
  }

  .brand-name {
    font-size: 11px;
  }

  .nav-link {
    font-size: 8px;
  }

  .nav-count {
    display: none;
  }

  .workspace-title h1 {
    max-width: 112px;
  }

  .dashboard-heading h2 {
    font-size: 34px;
  }

  .skill-owner-copy strong {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .asset-cover-media img,
  .asset-card:hover .asset-cover-media img,
  .asset-card:focus-within .asset-cover-media img {
    transform: none;
  }
}
