/* Knowptics Round 2: shared visual tokens and restrained page refinements. */

html[data-round2-visual-system] {
  --site-container: 1220px;
  --page-padding-desktop: 32px;
  --page-padding-tablet: 24px;
  --page-padding-mobile: 18px;
  --section-space-desktop: 88px;
  --section-space-mobile: 56px;
  --content-gap: 24px;
  --card-gap: 20px;
  --font-size-h1: clamp(2.75rem, 4.5vw, 3.75rem);
  --font-size-h2: clamp(2rem, 3vw, 2.75rem);
  --font-size-h3: 1.25rem;
  --font-size-body: 1rem;
  --font-size-meta: 0.8125rem;
  --line-height-heading: 1.12;
  --line-height-body: 1.75;
  --page-bg: #f7f7f3;
  --surface: #ffffff;
  --surface-muted: #f2f4f7;
  --surface-dark: #101318;
  --text-primary: #111318;
  --text-secondary: #4f5968;
  --text-muted: #7b8696;
  --border-subtle: #dce1e8;
  --border-dark-subtle: rgba(255, 255, 255, 0.08);
  --radius-media: 8px;
  --radius-panel: 12px;
  --radius-button: 6px;
  --button-height: 44px;
  --touch-target-min: 44px;
  background: var(--page-bg);
  border: 0;
}

html[data-round2-visual-system],
html[data-round2-visual-system] body {
  border-top: 0 !important;
  outline: 0;
}

html[data-round2-visual-system] body {
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[data-round2-visual-system] :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.38);
  outline-offset: 3px;
}

html[data-round2-visual-system] :where(button, [role="button"], input, select, summary) {
  min-height: var(--touch-target-min);
}

html[data-round2-visual-system] :where(img, svg, video) {
  max-width: 100%;
}

html[data-round2-visual-system] :where(.catalog-shell, .shell, .public-shell) {
  width: min(var(--site-container), calc(100% - 2 * var(--page-padding-desktop)));
  margin-inline: auto;
}

html[data-round2-visual-system] .catalog-header {
  border-top: 0 !important;
  border-bottom-color: rgba(17, 19, 24, 0.1);
}

html[data-round2-visual-system] .catalog-nav a,
html[data-round2-visual-system] .catalog-account,
html[data-round2-visual-system] .catalog-workbench,
html[data-round2-visual-system] .catalog-mobile-nav a {
  min-height: var(--touch-target-min);
}

/* Homepage micro-polish: retain the accepted composition. */
html[data-round2-visual-system] .home-redesign-header {
  border-top: 0 !important;
  border-bottom: 1px solid var(--border-dark-subtle) !important;
}

html[data-round2-visual-system] .home-proof-stats-band {
  border-top-color: rgba(255, 255, 255, 0.07) !important;
}

html[data-round2-visual-system] .home-proof-stats {
  border-top: 0 !important;
}

html[data-round2-visual-system] .home-proof-stats > a {
  border-color: rgba(255, 255, 255, 0.07) !important;
}

html[data-round2-visual-system] .home-featured-card figure,
html[data-round2-visual-system] .home-route-card figure {
  border-radius: var(--radius-media);
  overflow: hidden;
}

html[data-round2-visual-system] .home-featured-card figure img {
  background: #10151f;
}

/* Shared top-level page rhythm. */
html[data-round2-visual-system] .round1-page-intro,
html[data-round2-visual-system] .public-main > :first-child,
html[data-round2-visual-system] .faq-hero,
html[data-round2-visual-system] .article-hero,
html[data-round2-visual-system] .reference-hero {
  scroll-margin-top: 88px;
}

html[data-round2-visual-system] .round1-page-intro h1,
html[data-round2-visual-system] .pricing-hero h1,
html[data-round2-visual-system] .faq-hero h1,
html[data-round2-visual-system] .reference-hero h1 {
  letter-spacing: -0.035em;
  line-height: var(--line-height-heading);
}

html[data-round2-visual-system] .round1-page-intro > p,
html[data-round2-visual-system] .public-hero__lead,
html[data-round2-visual-system] .faq-hero > p:last-child,
html[data-round2-visual-system] .article-deck {
  color: var(--text-secondary);
  line-height: var(--line-height-body);
}

/* Tools: one mature real interface, one compact supporting product. */
html[data-round2-visual-system] .software-frequent-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: var(--card-gap);
}

html[data-round2-visual-system] .software-frequent-card,
html[data-round2-visual-system] .software-specialized-card,
html[data-round2-visual-system] .software-open-card {
  border-color: var(--border-subtle);
  border-radius: var(--radius-panel);
  overflow: hidden;
}

html[data-round2-visual-system] .software-frequent-card {
  min-height: 0;
}

html[data-round2-visual-system] .software-card__media {
  display: block;
  aspect-ratio: 16 / 7;
  margin: -1px -1px 24px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-muted);
}

html[data-round2-visual-system] .software-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

html[data-round2-visual-system] .software-card__media--logo {
  aspect-ratio: 16 / 7;
  display: grid;
  place-items: center;
  background: #f7f8fb;
}

html[data-round2-visual-system] .software-card__media--logo img {
  width: 30%;
  height: auto;
  object-fit: contain;
}

html[data-round2-visual-system] .software-card__summary {
  max-width: 44rem;
  color: var(--text-secondary);
}

/* Project: preserve the split portal while improving focus and mobile touch. */
html[data-round2-visual-system] .cooperation-entry {
  min-height: calc(100svh - 74px);
}

html[data-round2-visual-system] .cooperation-entry:focus-visible {
  position: relative;
  z-index: 2;
  outline-offset: -6px;
}

html[data-round2-visual-system] .cooperation-detail__lead {
  max-width: 48rem;
  line-height: var(--line-height-body);
}

html[data-round2-visual-system] .cooperation-detail__process li {
  min-height: var(--touch-target-min);
}

/* About: keep three concise layers and make capability groups scan evenly. */
html[data-round2-visual-system] .about-positioning-hero h1 {
  max-width: 980px;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

html[data-round2-visual-system] .about-positioning-hero__lead {
  max-width: 860px;
}

html[data-round2-visual-system] .about-capabilities {
  gap: var(--card-gap);
}

html[data-round2-visual-system] .about-capability {
  min-height: 250px;
  padding: 30px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
  display: flex;
  flex-direction: column;
}

html[data-round2-visual-system] .about-capability p {
  color: var(--text-secondary);
  line-height: var(--line-height-body);
}

html[data-round2-visual-system] .about-capability a {
  margin-top: auto;
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
}

/* Courses: preserve content and purchase rules, normalize cards and links. */
html[data-round2-visual-system] .course-sales-hero__visual img,
html[data-round2-visual-system] .course-card,
html[data-round2-visual-system] .course-offer-card,
html[data-round2-visual-system] .course-outcome-grid article {
  border-radius: var(--radius-panel);
}

html[data-round2-visual-system] .course-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

html[data-round2-visual-system] .course-card > p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html[data-round2-visual-system] .course-card__actions {
  margin-top: auto;
}

html[data-round2-visual-system] .course-cta {
  min-height: var(--button-height);
}

/* Knowledge: compact resource metadata without discarding technical context. */
html[data-round2-visual-system] .resource-card {
  border-radius: var(--radius-panel);
}

html[data-round2-visual-system] .resource-card__media {
  border-radius: var(--radius-media);
  overflow: hidden;
}

html[data-round2-visual-system] .resource-card__body h2,
html[data-round2-visual-system] .resource-card__body h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html[data-round2-visual-system] .resource-card__summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html[data-round2-visual-system] .resource-card__meta,
html[data-round2-visual-system] .resource-card__facts {
  font-size: var(--font-size-meta);
}

/* Article: reading-first width, figure rhythm, captions and code safety. */
html[data-round2-visual-system] .article-reading {
  max-width: 820px;
}

html[data-round2-visual-system] .article-prose {
  font-size: 1.0625rem;
  line-height: 1.86;
}

html[data-round2-visual-system] .article-prose :where(h2, h3, h4) {
  scroll-margin-top: 96px;
  line-height: 1.32;
}

html[data-round2-visual-system] .article-prose :where(figure, .article-figure) {
  margin-block: 36px;
}

html[data-round2-visual-system] .article-prose img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: var(--radius-media);
}

html[data-round2-visual-system] .article-prose figcaption,
html[data-round2-visual-system] .article-figure__caption {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: var(--font-size-meta);
  line-height: 1.6;
  text-align: center;
}

html[data-round2-visual-system] .article-prose :where(pre, code) {
  overflow-wrap: anywhere;
}

html[data-round2-visual-system] .article-prose pre {
  max-width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-panel);
}

/* Initial structures: media and parameters remain system-specific. */
html[data-round2-visual-system] .reference-page :where(.reference-hero, .reference-layout, .reference-section) {
  scroll-margin-top: 92px;
}

html[data-round2-visual-system] .reference-page :where(.reference-figure, .reference-panel, .reference-summary) {
  border-radius: var(--radius-panel);
}

html[data-round2-visual-system] .reference-page img {
  height: auto;
}

html[data-round2-visual-system] .reference-page table {
  width: 100%;
}

/* Pricing and FAQ: content remains unchanged; only visual-system alignment. */
html[data-round2-visual-system] .pricing-card,
html[data-round2-visual-system] .faq-item,
html[data-round2-visual-system] .faq-nav {
  border-radius: var(--radius-panel);
}

html[data-round2-visual-system] .pricing-card,
html[data-round2-visual-system] .faq-item {
  border-color: var(--border-subtle);
}

html[data-round2-visual-system] .faq-item summary {
  min-height: 56px;
}

html[data-round2-visual-system] .site-footer-v3 a {
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
}

@media (max-width: 1023px) {
  html[data-round2-visual-system] :where(.catalog-shell, .shell, .public-shell) {
    width: min(var(--site-container), calc(100% - 2 * var(--page-padding-tablet)));
  }

  html[data-round2-visual-system] .software-frequent-grid {
    grid-template-columns: 1fr;
  }

  html[data-round2-visual-system] .cooperation-entry {
    min-height: 50svh;
  }

  html[data-round2-visual-system] :where(
    .catalog-brand,
    .course-text-link,
    .course-comparison td a,
    .course-floating-cta > a,
    .article-breadcrumb a,
    .reference-breadcrumb a,
    .article-toc__item a
  ) {
    min-height: var(--touch-target-min);
    display: inline-flex;
    align-items: center;
  }

  html[data-round2-visual-system] :where(.article-breadcrumb a, .reference-breadcrumb a) {
    min-width: var(--touch-target-min);
    justify-content: center;
  }

  html[data-round2-visual-system] .header .mobile-nav-inner[data-home-navigation] .catalog-mobile-topic-menu a {
    min-height: var(--touch-target-min);
  }
}

@media (max-width: 767px) {
  html[data-round2-visual-system] :where(.catalog-shell, .shell, .public-shell) {
    width: calc(100% - 2 * var(--page-padding-mobile));
  }

  html[data-round2-visual-system] .home-proof-stats > a {
    border-color: rgba(255, 255, 255, 0.07) !important;
  }

  html[data-round2-visual-system] .software-card__media,
  html[data-round2-visual-system] .software-card__media--logo {
    aspect-ratio: 16 / 8.5;
    margin-bottom: 20px;
  }

  html[data-round2-visual-system] .about-capability {
    min-height: 0;
    padding: 24px;
  }

  html[data-round2-visual-system] .article-prose {
    font-size: 1rem;
    line-height: 1.82;
  }

  html[data-round2-visual-system] .article-prose :where(figure, .article-figure) {
    margin-block: 28px;
  }

}

@media (prefers-reduced-motion: reduce) {
  html[data-round2-visual-system] *,
  html[data-round2-visual-system] *::before,
  html[data-round2-visual-system] *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
