:root {
  color-scheme: light;
  --ms-bg: #ffffff;
  --ms-surface: #f5f5f7;
  --ms-surface-raised: #ffffff;
  --ms-text: #1d1d1f;
  --ms-text-secondary: #6e6e73;
  --ms-line: rgba(0, 0, 0, 0.1);
  --ms-accent: #0071e3;
  --ms-accent-hover: #0077ed;
  --ms-success: #08b13b;
  --ms-danger: #ff3b30;
  --ms-danger-hover: #d6352c;
  --ms-overlay: rgba(255, 255, 255, 0.95);
  --ms-nav-bg: rgba(255, 255, 255, 0.82);
  --ms-hover: rgba(0, 0, 0, 0.04);
  --ms-backdrop: rgba(0, 0, 0, 0.2);
  --ms-shadow-color: rgba(0, 0, 0, 0.1);
  --ms-card-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  --ms-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ms-mono-font: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
  --ms-nav-height: 44px;
  --ms-page-max: 1120px;
  --ms-content-max: 1024px;

  --bg: var(--ms-bg);
  --surface: var(--ms-surface);
  --text: var(--ms-text);
  --muted: var(--ms-text-secondary);
  --line: var(--ms-line);
  --accent: var(--ms-accent);
  --shadow: var(--ms-card-shadow);
  --r-globalnav-color: var(--ms-text);
  --r-globalnav-background-opened: var(--ms-overlay);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ms-bg: #000000;
  --ms-surface: #1d1d1f;
  --ms-surface-raised: #111113;
  --ms-text: #f5f5f7;
  --ms-text-secondary: #a1a1a6;
  --ms-line: rgba(255, 255, 255, 0.12);
  --ms-success: #30d158;
  --ms-overlay: rgba(29, 29, 31, 0.95);
  --ms-nav-bg: rgba(29, 29, 31, 0.82);
  --ms-hover: rgba(255, 255, 255, 0.08);
  --ms-backdrop: rgba(0, 0, 0, 0.5);
  --ms-shadow-color: rgba(0, 0, 0, 0.3);
  --ms-card-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ms-bg);
  color: var(--ms-text);
  font-family: var(--ms-font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

code {
  font-family: var(--ms-mono-font);
}

main {
  min-height: calc(100vh - 220px);
  padding-top: var(--ms-nav-height);
}

.mixstudio {
  min-height: 100vh;
  background: var(--ms-bg);
  color: var(--ms-text);
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  height: var(--ms-nav-height);
  border-bottom: 1px solid var(--ms-line);
  background: var(--ms-nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
}

.site-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--ms-content-max);
  padding: 0 22px;
}

.site-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ms-text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  transition: opacity 0.1s linear;
}

.site-nav-brand:hover {
  opacity: 0.8;
  color: var(--ms-text);
}

.site-nav-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.site-nav-logo svg {
  width: 100%;
  height: 100%;
}

.site-nav-center {
  display: flex;
  align-items: center;
  gap: 24px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.site-nav-center a {
  color: var(--ms-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.site-nav-center a:hover {
  opacity: 0.7;
}

.site-nav-end {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--ms-nav-height);
  padding: 0 8px;
  color: var(--ms-text);
  text-decoration: none;
  transition: opacity 0.1s linear;
}

.site-nav-user:hover {
  opacity: 0.8;
}

.site-nav-user svg {
  width: 16px;
  height: 16px;
}

.public-page {
  min-height: 100vh;
  background: var(--ms-bg);
  color: var(--ms-text);
}

.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 96px 24px 56px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--ms-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.subtitle {
  max-width: 680px;
  margin: 24px auto 0;
  color: var(--ms-text-secondary);
  font-size: clamp(18px, 2.5vw, 24px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  max-width: var(--ms-page-max);
  margin: 0 auto;
  padding: 0 24px 88px;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 30px;
  border: 1px solid var(--ms-line);
  border-radius: 22px;
  background: var(--ms-surface);
  color: var(--ms-text);
  box-shadow: none;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ms-card-shadow);
}

.card h2 {
  margin: 0 0 12px;
  color: var(--ms-text);
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.card p {
  margin: 0;
  color: var(--ms-text-secondary);
}

.card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.meta {
  margin-bottom: 12px;
  color: var(--ms-text-secondary);
  font-size: 13px;
}

.card-excerpt,
.card-description {
  color: var(--ms-text-secondary);
  line-height: 1.6;
}

.card-footer,
.read-more {
  margin-top: auto;
  padding-top: 24px;
  color: var(--ms-accent);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.read-more:hover {
  opacity: 0.75;
}

.empty-state,
.loading-state {
  max-width: 760px;
  margin: 0 auto 88px;
  padding: 42px 24px;
  border: 1px solid var(--ms-line);
  border-radius: 22px;
  background: var(--ms-surface);
  color: var(--ms-text-secondary);
  text-align: center;
}

.loading-state {
  margin-top: 24px;
}

.article {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.article-back {
  display: inline-block;
  margin-bottom: 32px;
  color: var(--ms-accent);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.article-back:hover {
  opacity: 0.75;
}

.article h1 {
  font-size: clamp(38px, 6vw, 64px);
}

.article-meta {
  margin-top: 18px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ms-line);
}

.article-body {
  margin-top: 42px;
  font-size: 18px;
  line-height: 1.8;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  color: var(--ms-text);
  margin: 32px 0 16px;
  line-height: 1.3;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body a {
  color: var(--ms-accent);
  text-decoration: none;
}

.article-body a:hover {
  text-decoration: underline;
}

.article-body ul,
.article-body ol {
  margin-bottom: 20px;
  padding-left: 28px;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body blockquote {
  margin: 24px 0;
  padding-left: 20px;
  border-left: 4px solid var(--ms-accent);
  color: var(--ms-text-secondary);
  font-style: italic;
}

.article-body table {
  display: block;
  width: 100%;
  margin-bottom: 24px;
  overflow-x: auto;
  border-collapse: collapse;
}

.article-body th,
.article-body td {
  padding: 10px 14px;
  border: 1px solid var(--ms-line);
  text-align: left;
}

.article-body th {
  background: var(--ms-surface);
  font-weight: 600;
}

.article-body img {
  max-width: 100%;
  border-radius: 14px;
}

.article-body pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 14px;
  background: #111827;
  color: #f9fafb;
}

.article-body code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--ms-hover);
}

.article-body pre code {
  padding: 0;
  background: transparent;
}

.product-card {
  text-align: center;
}

.product-card .card-description {
  margin-bottom: 24px;
  flex: 1;
}

.price-list {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--ms-line);
  color: var(--ms-text-secondary);
  font-size: 14px;
}

.price-row strong {
  color: var(--ms-text);
}

.video-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 700;
}

.video-links a {
  color: var(--ms-accent);
  text-decoration: none;
}

.plan-selector,
.product-subscribe-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 16px;
  padding: 4px;
  border-radius: 999px;
  background: var(--ms-bg);
}

.plan-selector button,
.product-chip {
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ms-text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.plan-selector button.active,
.product-chip.active {
  border-color: var(--ms-line);
  background: var(--ms-surface);
  color: var(--ms-text);
  box-shadow: 0 1px 3px var(--ms-shadow-color);
}

.pricing {
  min-height: 60px;
  margin: 18px 0 22px;
  color: var(--ms-text);
}

.price {
  color: var(--ms-text);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.billing-cycle {
  margin-left: 5px;
  color: var(--ms-text-secondary);
  font-size: 17px;
}

.plan-description,
.product-subscribe-desc,
.product-subscribe-error,
.product-subscribe-empty {
  margin: 0 0 18px;
  color: var(--ms-text-secondary);
  font-size: 13px;
}

.primary-button,
.button-pill,
.stripe-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--ms-accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.primary-button,
.stripe-button {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 15px;
}

.button-pill {
  padding: 12px 32px;
  border-radius: 999px;
  font-size: 16px;
}

.primary-button:hover,
.button-pill:hover,
.stripe-button:hover {
  opacity: 0.92;
}

.primary-button:disabled,
.button-pill:disabled,
.stripe-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-button.cancel {
  background: var(--ms-danger);
}

.primary-button.cancel:hover {
  background: var(--ms-danger-hover);
  opacity: 1;
}

.product-subscribe-mount {
  margin-top: 24px;
}

.product-subscribe-widget {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

.product-subscribe-widget .product-subscribe-row {
  justify-content: flex-start;
  margin: 0;
}

.product-subscribe-price {
  color: var(--ms-text);
  font-size: 24px;
  font-weight: 700;
}

.product-subscribe-price small {
  margin-left: 4px;
  color: var(--ms-text-secondary);
  font-size: 14px;
  font-weight: 400;
}

.product-subscribe-error,
.error-message {
  color: #c44;
}

.error-message {
  max-width: 680px;
  margin: 0 auto 28px;
  text-align: center;
}

.load-more-container {
  margin: -36px auto 88px;
  text-align: center;
}

.pagination {
  max-width: var(--ms-page-max);
  margin: -48px auto 88px;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.pagination a {
  background: var(--ms-surface);
  color: var(--ms-text);
  border: 1px solid var(--ms-line);
}

.pagination a:hover {
  background: var(--ms-accent);
  color: #ffffff;
  border-color: var(--ms-accent);
}

.pagination .current {
  background: var(--ms-accent);
  color: #ffffff;
}

.pagination .disabled {
  color: var(--ms-text-secondary);
  opacity: 0.5;
}

.site-footer {
  background: var(--ms-nav-bg);
  border-top: 1px solid var(--ms-line);
  padding: 2rem 0;
  margin-top: auto;
  color: var(--ms-text-secondary);
}

.site-footer-inner {
  max-width: var(--ms-content-max);
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer-copyright {
  font-size: 12px;
  color: var(--ms-text-secondary);
}

.site-footer-links {
  display: flex;
  gap: 16px;
}

.site-footer-links a {
  font-size: 12px;
  color: var(--ms-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer-links a:hover {
  color: var(--ms-text);
  text-decoration: underline;
}

.site-footer-social {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.site-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ms-text-secondary);
  transition: transform 0.2s ease, color 0.2s ease;
}

.site-footer-social a:hover {
  color: var(--ms-text);
  transform: translateY(-2px);
}

.site-footer-social svg {
  width: 20px;
  height: 20px;
}

.site-footer-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-footer-langs {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.site-footer-langs button {
  background: transparent;
  color: var(--ms-text);
  border: 1px solid var(--ms-line);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.site-footer-langs button:hover {
  background: var(--ms-hover);
}

.site-footer-langs button.active {
  background: var(--ms-accent);
  color: #ffffff;
  border-color: var(--ms-accent);
}

.site-footer-theme {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--ms-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.1s linear;
}

.site-footer-theme:hover {
  opacity: 0.8;
}

.site-footer-theme svg {
  width: 20px;
  height: 20px;
}

.site-footer-theme .theme-icon-sun {
  display: none;
}

body[data-theme="dark"] .site-footer-theme .theme-icon-sun {
  display: inline-flex;
}

body[data-theme="dark"] .site-footer-theme .theme-icon-moon {
  display: none;
}

@media (max-width: 768px) {
  .site-nav-center {
    display: none;
  }

  .site-footer-inner {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .site-footer-section {
    align-items: center;
  }

  .hero {
    padding: 64px 20px 40px;
  }

  .grid {
    grid-template-columns: 1fr;
    padding: 0 18px 72px;
  }

  .card {
    padding: 24px;
  }

  .pagination {
    flex-wrap: wrap;
  }
}
