/* Sidebar navigation; loaded after the original site styles. */
:root { --sidebar-width: 232px; }
.page { max-width: 1600px; margin-left: var(--sidebar-width); padding: 24px clamp(20px, 3vw, 56px) 40px; }
.nav.glass { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); max-width: none; border: 0; border-right: 1px solid var(--stroke-secondary); border-radius: 0; box-shadow: none; background: var(--fill-primary-on); color: var(--text-primary); padding: 32px 18px 20px; display: flex; flex-direction: column; align-items: stretch; gap: 32px; backdrop-filter: none; }
.nav :focus-visible { outline-color: var(--text-primary); }
.nav-brand { display: block; padding: 0 12px; text-decoration: none; color: var(--text-primary); }
.nav-brand strong { font-size: 23px; letter-spacing: -.7px; }
.nav-brand strong span { font-weight: 500; margin-left: 3px; }
.nav-brand small { display: block; margin-top: 8px; font-size: 11px; color: var(--text-secondary); }
.nav-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 12px; }
.nav-panel[hidden] { display: none; }
.nav-caption { margin: 0; padding: 0 12px; font-size: 11px; letter-spacing: 2px; color: var(--text-secondary); }
.nav .seg { position: relative; display: flex; flex-direction: column; gap: 5px; overflow-y: auto; overflow-x: hidden; border-radius: 0; background: transparent; scrollbar-width: thin; padding: 4px; margin: 0 -4px; }
.nav .seg a { display: flex; align-items: center; min-height: 45px; padding: 10px 12px; gap: 12px; border-radius: 10px; color: var(--text-secondary); font-size: 14px; }
.nav .seg a:hover { background: var(--fill-tertiary); color: var(--text-primary); }
.nav .seg a[aria-current="true"] { background: var(--fill-primary); color: var(--text-primary-on); }
.nav-number { font-size: 11px; opacity: .65; font-variant-numeric: tabular-nums; }
.nav-bottom { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--stroke-secondary); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-bottom a { color: var(--text-secondary); font-size: 12px; text-decoration: none; }
.nav .theme-btn { background: var(--fill-tertiary); color: var(--text-primary); width: 40px; height: 40px; }
.menu-toggle { display: none; }
.section { scroll-margin-top: 24px; }
.skip-link { position: fixed; top: 8px; left: 8px; transform: translateY(-200%); background: var(--fill-primary); color: var(--text-primary-on); padding: 12px; z-index: 50; }
.skip-link:focus { transform: none; }
@media (min-width: 1832px) { .page { margin-inline: auto; padding-left: calc(var(--sidebar-width) + 32px); max-width: 1832px; } }
@media (max-width: 900px) {
  .page { margin-left: 0; padding: 88px var(--gutter) 32px; }
  .nav.glass { inset: 0 0 auto; width: 100%; padding: 14px var(--gutter); min-height: 68px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; border-right: 0; border-bottom: 1px solid var(--stroke-secondary); }
  .nav-brand { padding: 0; }
  .nav-brand strong { font-size: 20px; }
  .nav-brand small { display: none; }
  .menu-toggle { display: flex; gap: 12px; align-items: center; justify-content: center; min-height: 40px; padding: 8px 12px; background: var(--fill-tertiary); color: var(--text-primary); border: 0; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; }
  .nav-panel { grid-column: 1 / -1; margin-top: 20px; max-height: calc(100dvh - 110px); }
  .nav .seg { flex-shrink: 1; }
  .nav-bottom { flex-shrink: 0; padding-top: 12px; }
  .section { scroll-margin-top: 88px; }
}
@media print {
  .nav.glass { display: none; }
  .page { margin: 0; padding: 0; max-width: none; }
}

/* A gentle, illustrative workspace animation; all tutorial content remains readable. */
.hero-workflow { position: absolute; top: clamp(24px, 4vw, 54px); left: clamp(24px, 4vw, 48px); width: min(320px, 34%); border: 1px solid rgba(255,255,255,.28); border-radius: 16px; background: rgba(24,25,27,.78); box-shadow: 0 16px 50px rgba(0,0,0,.18); color: #f5f5f7; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: workspace-arrive .8s both, workspace-float 6s ease-in-out 1s infinite; }
.hero-workflow__bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 10px; color: rgba(255,255,255,.65); }
.hero-workflow__dots { letter-spacing: 2px; font-size: 8px; color: #b9e6cb; }
.hero-workflow__body { display: grid; gap: 10px; padding: 16px; font-size: 12px; }
.hero-workflow__prompt { color: rgba(255,255,255,.66); }
.hero-workflow__step { animation: workflow-step 8s ease-in-out infinite; }
.hero-workflow__cursor { color: #a5e3bd; animation: blink 1s step-end infinite; }
.hero-workflow__done { color: #a5e3bd; animation: workflow-done 8s ease-in-out infinite; }
.hero__copy > * { animation: text-arrive .7s both; }
.hero__copy > :nth-child(2) { animation-delay: .1s; }
.hero__copy > :nth-child(3) { animation-delay: .2s; }
.hero__copy > :nth-child(4) { animation-delay: .3s; }
.nav .seg a, .btn, .cards > div { transition: background-color .2s ease, color .2s ease, transform .25s ease, box-shadow .25s ease; }
@media (hover: hover) { .cards > div:hover { transform: translateY(-4px); } .btn:hover { transform: translateY(-2px); } .nav .seg a:hover { transform: translateX(3px); } }
.motion-ready { opacity: 0; transform: translateY(16px); transition: opacity .65s ease, transform .65s ease; }
.motion-ready.motion-visible { opacity: 1; transform: none; }
@keyframes workspace-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes workspace-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes text-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes workflow-step { 0%,12% { opacity: .25; } 25%,82% { opacity: 1; } 95%,100% { opacity: .25; } }
@keyframes workflow-done { 0%,42% { opacity: .2; } 60%,88% { opacity: 1; } 100% { opacity: .2; } }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 760px) { .hero-workflow { top: 24px; left: 24px; width: min(290px, calc(100% - 48px)); } }
@media (prefers-reduced-motion: reduce) { .hero-workflow, .hero-workflow__step, .hero-workflow__done, .hero-workflow__cursor, .hero__copy > * { animation: none; } .motion-ready { opacity: 1; transform: none; transition: none; } }
@media print { .hero-workflow { display: none; } .motion-ready { opacity: 1; transform: none; } }

/* A lively blue, mint, peach and lavender palette for the learning guide. */
:root {
  --guide-blue: light-dark(#3554cc, #a7b8ff);
  --guide-blue-deep: light-dark(#233fac, #c6d1ff);
  --guide-mint: light-dark(#d8f4e9, #193e37);
  --guide-peach: light-dark(#ffeadc, #49352d);
  --guide-lavender: light-dark(#e8e5ff, #383350);
  --guide-sky: light-dark(#e2f0ff, #263b50);
  --fill-primary-on: light-dark(#f8f9ff, #161923);
  --fill-tertiary: light-dark(#eef0fa, #292e3d);
  --stroke-secondary: light-dark(#343d7420, #ccd5ff20);
}
body { background: radial-gradient(ellipse at 90% 5%, light-dark(#dbe9ff, #25304d), transparent 28%), var(--fill-primary-on); }
.nav.glass { background: light-dark(#fff, #1b1e2a); border-right-color: light-dark(#dfe5f6, #30384d); }
.nav-brand strong { color: var(--guide-blue); }
.nav-brand strong span { color: var(--text-primary); }
.nav-caption { color: var(--guide-blue); font-weight: 700; }
.nav .seg a[aria-current="true"] { background: light-dark(#3454cc, #aebeff); color: light-dark(#fff, #192241); box-shadow: 0 6px 16px light-dark(#3454cc33, #101b464d); }
.nav .seg a:hover:not([aria-current="true"]) { background: light-dark(#eef1ff, #30374d); color: var(--guide-blue); }
.hero { box-shadow: 0 18px 50px light-dark(#263c7133, #0005); }
.hero__img { animation: comic-drift 24s ease-in-out infinite alternate; }
@keyframes comic-drift { from { transform: scale(1.03) translateX(0); } to { transform: scale(1.09) translateX(-1%); } }
@media (prefers-reduced-motion: reduce) { .hero__img { animation: none; } }
.hero::after { background: linear-gradient(to top, rgba(14, 28, 72, .88), rgba(40, 50, 112, .28) 65%), linear-gradient(to right, rgba(27, 49, 112, .45), transparent 65%); }
.hero__eyebrow { background: rgba(185, 225, 216, .24); border-color: rgba(200, 255, 231, .52); }
.hero-workflow { background: rgba(25, 37, 88, .9); border-color: rgba(173, 199, 255, .5); }
.hero-workflow__dots, .hero-workflow__cursor, .hero-workflow__done { color: #9ef2cd; }
.head__eyebrow, .step__eyebrow { color: var(--guide-blue); font-weight: 600; }
.head__eyebrow::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; background: #47c99a; vertical-align: 1px; }
.cards > div:nth-child(4n + 1) { background: var(--guide-mint); }
.cards > div:nth-child(4n + 2) { background: var(--guide-lavender); }
.cards > div:nth-child(4n + 3) { background: var(--guide-peach); }
.cards > div:nth-child(4n + 4) { background: var(--guide-sky); }
.cards > div { box-shadow: inset 0 0 0 1px light-dark(#334a6810, #ffffff10); }
.step__num { color: var(--guide-blue); }
.step__panel, .aside, .x-faq details { background: var(--fill-tertiary); }
.dot::before { background: #17ad78; }
.nav .theme-btn, .menu-toggle { background: light-dark(#edf1ff, #30374d); color: var(--guide-blue-deep); }

.system-picker { display: grid; gap: 12px; }
.system-choice { border-radius: 18px; background: var(--guide-sky); border: 1px solid var(--stroke-secondary); overflow: hidden; }
.system-choice:nth-child(2) { background: var(--guide-lavender); }
.system-choice:nth-child(3) { background: var(--guide-mint); }
.system-choice summary { display: flex; align-items: center; gap: 16px; padding: 20px; list-style: none; cursor: pointer; }
.system-choice summary::-webkit-details-marker { display: none; }
.system-choice summary strong, .system-choice summary small { display: block; }
.system-choice summary strong { font-size: 18px; }
.system-choice summary small { margin-top: 5px; color: var(--text-secondary); font-size: 13px; }
.system-choice__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: light-dark(#ffffffba, #ffffff1c); color: var(--guide-blue); font-size: 21px; font-weight: 700; }
.system-choice__icon svg { display: block; width: 25px; height: 25px; }
.system-choice__arrow { margin-left: auto; color: var(--guide-blue); font-size: 22px; transition: transform .2s ease; }
.system-choice[open] .system-choice__arrow { transform: rotate(45deg); }
.system-choice__body { padding: 0 20px 20px; }
.system-choice__lead { margin: 0 0 12px; color: var(--text-secondary); }
.system-choice__link { display: inline-flex; margin-bottom: 10px; }
.system-choice__body .step { padding: 22px 0 0; }
.system-choice__body .step__intro { display: none; }
.system-choice__body .step { grid-template-columns: minmax(0, 1fr); }
.mirror-choice { border: 1px solid var(--stroke-secondary); border-radius: 16px; padding: 16px 20px; }
.mirror-choice > summary { cursor: pointer; font-weight: 600; color: var(--guide-blue); }
.mirror-choice[open] > .fineprint { margin-top: 14px; }
.section .x-choose .x-shop .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 18px; border: 0; background: #3657cf; color: #fff; font-weight: 650; box-shadow: 0 5px 14px #3657cf36; transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
.section .x-choose .x-shop .btn:hover { background: #2746b7; box-shadow: 0 8px 20px #3657cf50; transform: translateY(-2px); }
.section .x-choose .x-shop .btn:focus-visible { outline: 3px solid #7690ff; outline-offset: 3px; }
.group-invite { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(22px, 3vw, 36px); border-radius: 22px; background: var(--guide-lavender); }
.group-invite__eyebrow { color: var(--guide-blue); font-weight: 600; font-size: 13px; margin: 0 0 8px; }
.group-invite h3 { font-size: 24px; margin: 0 0 8px; }
.group-invite p { color: var(--text-secondary); }
.group-invite .group-invite__eyebrow { color: var(--guide-blue); }
.group-invite figure { flex: 0 0 260px; width: 260px; max-width: 100%; margin: 0; text-align: center; }
.group-invite img { display: block; width: min(260px, 100%); height: auto; border-radius: 14px; }
.group-invite figcaption { margin-top: 8px; color: var(--text-secondary); font-size: 13px; }
.group-inline { width: min(300px, 100%); margin: 24px 0 0; text-align: center; }
.group-inline img { display: block; width: 100%; height: auto; border-radius: 16px; }
.group-inline figcaption { margin-top: 8px; color: var(--text-secondary); font-size: 13px; }
.contact-qr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: clamp(20px, 4vw, 48px); align-items: start; }
.contact-qr-grid .group-inline, .contact-qr-grid .x-qr { margin: 0; width: 100%; }
.contact-qr-grid .group-inline img, .contact-qr-grid .x-qr__img { width: 100%; height: auto; aspect-ratio: 512 / 900; object-fit: contain; }
@media (max-width: 599px) { .contact-qr-grid { grid-template-columns: minmax(0, 300px); } }
@media (max-width: 599px) { .group-invite { flex-direction: column; align-items: flex-start; } .group-invite figure { flex: none; align-self: center; } }
