.classnode-mobile-nav { display: none; }

@media (max-width: 920px) {
  .classnode-mobile-nav {
    display: block;
    border-top: 1px solid var(--border);
  }
  .classnode-mobile-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 14px;
    list-style: none;
    padding: 0 10px;
  }
  .classnode-mobile-nav a {
    display: block;
    padding: 6px 1px;
    font-size: .84rem;
  }
  .classnode-mobile-nav .active { color: var(--accent-hover); font-weight: 700; }
  .classnode-site.guide-page .guide-landing,
  .classnode-site.guide-page .guide-doc { padding-top: 114px; }
  .classnode-site.guide-page [id] { scroll-margin-top: 105px; }
  .classnode-site .guide-sidebar { top: 112px; max-height: calc(100vh - 126px); }
}

@media (max-width: 650px) {
  .classnode-site .guide-sidebar { max-height: none; }
}

.classnode-site {
  --site-action: #23675e;
  --site-action-hover: #17433e;
  --site-action-text: #fff;
  --site-anchor-offset: 86px;
}

[data-theme="dark"] .classnode-site {
  --site-action: #a5ded2;
  --site-action-hover: #bdebe2;
  --site-action-text: #153d36;
}

.classnode-site [id] { scroll-margin-top: var(--site-anchor-offset); }
.classnode-site .nav-logo { gap: 10px; }
.classnode-brand-mark { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.classnode-site .nav-logo-name { font-size: 1.48rem; letter-spacing: .025em; }
.classnode-site .nav-logo-tagline {
  display: block;
  color: var(--text-secondary);
  font-size: .84rem;
  margin-top: 3px;
}
.classnode-site .nav-menu a.active,
.classnode-site .classnode-mobile-nav a.active { color: var(--guide-ink); }
.classnode-site .nav-menu a::after,
.classnode-site #scrollProgress { background: var(--guide-ink); box-shadow: none; }
.classnode-site :is(a, button, summary):focus-visible {
  outline: 2px solid var(--guide-ink);
  outline-offset: 4px;
}
.classnode-site .btn { border-radius: 7px; box-shadow: none; }
.classnode-site .btn-primary,
.classnode-site .btn-primary:hover {
  background: var(--site-action);
  color: var(--site-action-text);
  box-shadow: none;
  transform: none;
}
.classnode-site .btn-primary:hover { background: var(--site-action-hover); }
.classnode-site .btn-ghost:hover {
  color: var(--guide-ink);
  border-color: var(--guide-ink);
  transform: none;
}

.site-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.product-intro { align-items: center; }
.product-intro > div:first-child > p:last-of-type { max-width: 38em; }
.site-intro-card {
  padding: 17px 19px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}
.site-intro-card p { margin: 3px 0 7px; font-size: .94rem; }
.site-intro-card a, .site-reference a,
.classnode-install .guide-text a, .classnode-install .guide-note a {
  color: var(--guide-ink);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.site-intro-card a + a { margin-left: 12px; }

.site-section { padding: 28px 0 36px; }
.site-section + .site-section { border-top: 1px solid var(--border); }
.site-section-heading { margin-bottom: 14px; }
.site-section-heading h2, .install-content .guide-h2 {
  font-size: clamp(1.4rem, 3.3vw, 1.9rem);
  line-height: 1.3;
}
.site-section-heading p, .site-reference p { color: var(--text-secondary); margin-top: 6px; }
.site-module-list, .site-workflow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.site-module-list { list-style: none; border-top: 1px solid var(--border-strong); }
.site-module-list li { border-bottom: 1px solid var(--border); }
.site-module-list a { display: grid; gap: 3px; height: 100%; padding: 11px 10px; border-radius: 7px; }
.site-module-list a:hover { background: var(--guide-surface); }
.site-module-list strong { color: var(--guide-ink); }
.site-module-list span { color: var(--text-secondary); font-size: .94rem; }
.site-release-note { margin-top: 15px; }
.site-reference { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 12px; }
.site-reference h3 { font-size: 1.1rem; }

.classnode-product .showcase-tabs {
  justify-content: flex-start;
  margin-bottom: 14px;
}
.classnode-product .showcase-tab { border-radius: 7px; box-shadow: none; }
.classnode-product .showcase-tab.active,
.classnode-product .showcase-tab:hover {
  background: var(--guide-surface);
  color: var(--guide-ink);
  border-color: var(--guide-ink);
}
.classnode-product .showcase-mockup-bar { display: none; }
.classnode-product .showcase-mockup,
.classnode-site .dl-card,
.classnode-product .repo-link { box-shadow: none; border-radius: 10px; }
.classnode-product .showcase-info-title,
.classnode-product .showcase-info-list svg,
.classnode-site .dl-code,
.classnode-product .repo-arrow { color: var(--guide-ink); }
.classnode-product .dl-grid,
.classnode-product .repo-grid { margin-left: 0; }
.classnode-site .dl-card:hover, .classnode-product .repo-link:hover { transform: none; border-color: var(--guide-ink); }
.classnode-site .dl-btn { border-radius: 6px; background: var(--guide-surface); color: var(--guide-ink); }
.site-repositories { margin-top: 16px; }

.install-intro { grid-template-columns: minmax(0, 1fr) auto; }
.install-intro .site-actions { align-items: center; gap: 14px; margin: 0; }
.install-layout {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  grid-template-areas: "side content";
  align-items: start;
  gap: clamp(18px, 4vw, 42px);
  padding-top: 25px;
  padding-bottom: 48px;
}
.install-sidebar { grid-area: side; top: var(--site-anchor-offset); }
.install-sidebar ul { list-style: none; }
.install-sidebar a { display: block; border-radius: 6px; padding: 7px 8px; font-size: .9rem; }
.install-sidebar a:hover { background: var(--guide-surface); color: var(--guide-ink); }
.install-content { grid-area: content; min-width: 0; }
.install-content .guide-section { padding: 28px 0 36px; }
.install-content .guide-section:first-child { padding-top: 0; }
.install-content .guide-section + .guide-section { border-top: 1px solid var(--border); }
.install-content .guide-container { max-width: none; padding: 0; }
.install-content .guide-header { margin-bottom: 15px; }
.install-content .guide-card { box-shadow: none; padding: clamp(12px, 3vw, 22px); }
.install-content .guide-code-block { box-shadow: none; }
.install-content :is(.guide-note, .guide-info, .guide-next) { background: var(--guide-surface); border-color: var(--border-strong); }
.install-content .guide-note.warn { border-left-color: #bd6353; }
.install-content .guide-next { text-align: left; }
.install-content :is(.guide-next strong, .guide-next a, :not(pre) > code) { color: var(--guide-ink); }
.install-content .guide-reference { margin-bottom: 16px; }
.install-content .guide-card > :last-child { margin-bottom: 0; }
.install-next { grid-template-columns: 1fr; }
.classnode-missing main { min-height: 72vh; }
.classnode-missing .guide-intro { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 920px) {
  .classnode-site { --site-anchor-offset: 108px; }
  .classnode-site:is(.classnode-product, .classnode-install, .classnode-missing) .guide-landing { padding-top: 125px; }
  .install-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "side" "content";
  }
  .install-sidebar { position: static; }
  .install-sidebar ul { display: flex; flex-wrap: wrap; }
}
@media (max-width: 650px) {
  .classnode-brand-mark { width: 36px; height: 36px; border-radius: 9px; }
  .classnode-site .nav-logo-name { font-size: 1.21rem; }
  .classnode-site .nav-logo-tagline { font-size: .73rem; margin-top: 1px; }
  .site-module-list, .site-workflow { grid-template-columns: minmax(0, 1fr); }
  .install-intro { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* Shared ClassNode palette. The workshop keeps its own variables. */
.classnode-site {
  --bg-primary: #fbfaf4;
  --bg-secondary: #f0f1e7;
  --bg-card: #fffef9;
  --text-primary: #1c2d25;
  --text-secondary: #4e5e53;
  --text-tertiary: #5d6d61;
  --border: #dfe4d7;
  --border-strong: #c7d2c2;
  --nav-bg: #fbfaf4f5;
  --guide-surface: #edf1e6;
  --guide-ink: #235642;
  --site-action: #1d4939;
  --site-action-hover: #132f25;
  --home-gold: #f3c65b;
  --home-gold-text: #20352a;
}
[data-theme="dark"] .classnode-site {
  --bg-primary: #191f1b;
  --bg-secondary: #222b25;
  --bg-card: #232c26;
  --text-primary: #f0eee3;
  --text-secondary: #c0cbbd;
  --text-tertiary: #aebbae;
  --border: #354238;
  --border-strong: #526358;
  --nav-bg: #191f1bf5;
  --guide-surface: #27382d;
  --guide-ink: #b8dfc2;
  --site-action: #b8dfc2;
  --site-action-hover: #d0ecd7;
  --site-action-text: #152f26;
}
.classnode-site .footer-brand { color: var(--text-primary); }
.site-text-link {
  color: var(--guide-ink);
  font-weight: 680;
  text-decoration: underline;
  text-underline-offset: .22em;
}
.classnode-product [hidden] { display: none !important; }
.home-hero {
  overflow: hidden;
  padding-top: 64px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}
.home-hero-grid { display: grid; grid-template-columns: 1fr 1.17fr; align-items: stretch; }
.home-hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: clamp(28px, 3.8vw, 54px) 12px clamp(28px, 3.8vw, 54px) 0;
}
.home-eyebrow { font-size: .92rem; font-weight: 700; color: var(--guide-ink); }
.home-hero .hero-title {
  font-size: clamp(2.2rem, 4.6vw, 4.15rem);
  line-height: 1.12;
  letter-spacing: -.055em;
  margin: 12px 0 18px;
}
.home-hero .hero-title span { color: var(--guide-ink); }
.home-description { color: var(--text-secondary); font-size: clamp(.99rem, 1.5vw, 1.14rem); }
.home-description + .home-description { margin-top: 8px; }
.home-photo {
  min-width: 0;
  position: relative;
  margin: 0 -28px 0 -5%;
  display: grid;
  background: #204134;
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
}
.home-scene-photo {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  object-position: 64% center;
  clip-path: polygon(16% 0, 100% 0, 100% 100%, 4% 100%);
}
.home-photo::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 66px;
  height: 61px;
  background: var(--home-gold);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.home-feedback-phase a { border-top-color: var(--home-gold); background: var(--guide-surface); }
.home-scenarios { margin-top: 12px; }
.home-scenarios a { margin-left: 8px; }
.home-download .guide-feature { grid-template-columns: 1fr; }
.install-platforms a { border-top-color: var(--guide-ink); }
.install-download-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin: 24px 0 10px;
}
.install-download-heading h3 { font-size: 1.18rem; }
.install-content .dl-grid { gap: 10px; }
.install-content .dl-card { padding: 16px; }
.about-intro { grid-template-columns: 1fr auto; align-items: center; }
.about-intro img { width: clamp(65px, 11vw, 122px); height: auto; }
.about-content > section > p { max-width: 70ch; margin-top: 8px; }
@media (max-width: 920px) {
  .home-hero { padding-top: 102px; }
  .classnode-about .guide-landing { padding-top: 125px; }
}
@media (max-width: 650px) {
  .home-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .home-hero-copy { padding: 24px 0 22px; }
  .home-photo { margin: 0 -18px; clip-path: none; }
  .home-scene-photo { min-height: 0; max-height: 310px; aspect-ratio: 1.76; clip-path: none; }
  .home-photo::after { width: 36px; height: 32px; }
}

.classnode-site .footer-links {
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 18px;
}
@media (max-width: 360px) {
  .classnode-site .nav-inner { padding-inline: 12px; }
  .classnode-site .nav-logo { gap: 7px; }
  .classnode-site .nav-right .btn { padding-inline: 8px; }
  .classnode-mobile-nav ul { gap: 0 10px; }
}

.home-visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  white-space: nowrap;
}
.home-hero-grid { min-height: clamp(380px, 30vw, 445px); }
.home-photo { min-height: 0; }
.home-scene-photo { position: absolute; inset: 0; min-height: 0; }
.home-photo-input .home-scene-photo { object-position: 61% 55%; }
.home-photo-setup .home-scene-photo { object-position: 60% center; }
.home-photo-companion .home-scene-photo { object-position: 54% center; }
.home-photo-review .home-scene-photo { object-position: 57% center; }
.home-scene-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: polygon(16% 0, 100% 0, 100% 100%, 4% 100%);
}
.home-scene { position: absolute; inset: 0; }
.home-scene > .home-scene-photo { clip-path: none; }
.home-scene-screen { display: none; }
.home-scene.is-fitted {
  inset: auto;
  top: 50%;
  left: 50%;
  width: 1200px;
  height: 675px;
  transform: translate(-50%, -50%) scale(var(--scene-scale, 1));
}
.home-scene.is-fitted > .home-scene-photo {
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: fill;
}
.home-scene.is-fitted > .home-scene-screen {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  width: var(--screen-width);
  height: var(--screen-height);
  object-fit: var(--screen-fit, fill);
  background: #f5f8f9;
  transform-origin: 0 0;
  transform: var(--screen-transform);
  clip-path: var(--screen-mask);
}
@media (max-width: 650px) {
  .home-scene-frame { clip-path: none; }
}
.home-advantage-controls {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}
.home-advantage-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 5px;
  padding-bottom: 5px;
}
.home-advantage-options { display: flex; }
.home-advantage-options button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}
.home-advantage-options button span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .42;
}
.home-advantage-options button:hover span { opacity: .85; }
.home-advantage-options button[aria-current="true"] span {
  width: 9px;
  height: 9px;
  opacity: 1;
  outline: 1px solid currentColor;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  [data-advantage-slide]:not([hidden]) .home-scene-photo { animation: home-advantage-reveal .28s ease-out; }
  @keyframes home-advantage-reveal { from { opacity: .55; } to { opacity: 1; } }
}
@media (max-width: 650px) {
  .home-hero-grid { min-height: 0; }
  .home-hero-copy { min-height: 306px; align-content: center; }
  .home-photo { min-height: 0; aspect-ratio: 16 / 9; }
  .home-scene-photo { max-height: none; }
}

/* Reserve the tallest slide's space so rotation doesn't move the controls. */
.home-advantage-stage { display: grid; }
.home-advantage-stage > [data-advantage-slide] { grid-area: 1 / 1; width: 100%; }
.classnode-product .home-advantage-stage > [data-advantage-slide][hidden] {
  display: grid !important;
  visibility: hidden;
  pointer-events: none;
}

/* Place the actual ClassNode frame inside the display; preserve foreground silhouettes. */
.home-photo-feedback {
  --screen-width: 619px;
  --screen-height: 307px;
  --screen-transform: translate(298px, 27px);
  --screen-mask: polygon(
    0 0, 100% 0, 100% 73%, 95.8% 73%, 100% 83%, 100% 100%,
    18% 100%, 17.4% 94%, 16.5% 89%, 14.8% 85%, 12.2% 81%,
    9.4% 78%, 7.1% 77.5%, 4.8% 78.5%, 2.7% 81%, 1% 85%, 0 91%
  );
}
