@layer app {
  .guide-page { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 2.5rem 0 6rem; }
  .guide-page .back-link { color: var(--primary-hover); font-weight: 800; }
  .guide-progress-bar { position: fixed; top: 0; left: 0; z-index: 70; width: 100%; height: 3px; background: var(--progress); transform: scaleX(0); transform-origin: left; }
  .guide-hero { position: relative; isolation: isolate; margin-top: 1.75rem; overflow: hidden; border-radius: 0.75rem; background: var(--ink); padding: clamp(1.5rem, 4vw, 2.75rem); color: #ffffff; }
  .guide-hero::after { position: absolute; right: 0; bottom: 0; left: 0; height: 0.4rem; background: var(--progress); content: ""; transform-origin: left; animation: guide-hero-sprint 650ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .guide-hero h1 { max-width: 24ch; font-family: "Manrope", var(--font-sans); font-size: clamp(2.25rem, 4vw, 3.75rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }
  .guide-hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
  .guide-hero-meta li { border: 1px solid rgb(255 255 255 / 32%); border-radius: 999px; padding: 0.35rem 0.8rem; color: var(--blue); font-size: 0.78rem; font-weight: 700; }
  .guide-hero-meta li:first-child { border-color: #ffffff; background: #ffffff; color: var(--ink); }
  .guide-demo { margin-top: clamp(2.5rem, 6vw, 5rem); overflow: hidden; border-radius: 0.75rem; background: var(--ink); }
  .guide-demo > header { padding: clamp(1.25rem, 4vw, 2rem); color: #ffffff; }
  .guide-demo > header > p:first-child { color: var(--progress); font-size: 0.78rem; font-weight: 800; }
  .guide-demo h2 { margin-top: 0.35rem; color: #ffffff; font: 800 clamp(1.6rem, 3vw, 2.25rem) / 1.1 "Manrope", var(--font-sans); letter-spacing: -0.03em; }
  .guide-demo > header > p:last-child { max-width: 65ch; margin-top: 0.65rem; color: var(--line); line-height: 1.6; }
  .guide-demo iframe { display: block; width: 100%; height: min(600px, 75vh); border: 0; background: #ffffff; }
  .guide-visuals { margin-top: clamp(2.5rem, 6vw, 5rem); }
  .guide-visuals > header p { color: var(--primary-hover); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
  .guide-visuals h2 { max-width: none; margin-top: 0.35rem; color: var(--ink); font-family: "Manrope", var(--font-sans); font-size: clamp(1.8rem, 3.5vw, 2.7rem); font-weight: 800; letter-spacing: -0.03em; }
  .guide-visuals-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; margin-top: 1.5rem; }
  .guide-visual-card { overflow: hidden; border: 1px solid var(--line); border-radius: 0.75rem; background: #ffffff; }
  .guide-visual-card figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: 0.9rem 1rem; }
  .guide-visual-card figcaption strong { color: var(--ink); font-size: 0.9rem; }
  .guide-visual-card figcaption span, .guide-chart > p { color: var(--muted); font-size: 0.78rem; }
  .guide-diagram > div { min-height: 17rem; padding: 1rem; }
  .guide-diagram svg { display: block; max-width: 100%; height: auto; margin: auto; }
  .guide-chart-canvas { position: relative; height: 17rem; padding: 1rem; }
  .guide-chart > p { margin: 0; border-top: 1px solid var(--line); padding: 0.75rem 1rem; }
  .guide-layout { display: grid; grid-template-columns: 200px minmax(0, 720px); gap: clamp(2rem, 7vw, 6rem); margin: clamp(2.5rem, 6vw, 5rem) 0; }
  .guide-nav { position: sticky; top: 2rem; font-size: 0.82rem; }
  .guide-nav strong { color: var(--ink); font-size: 0.7rem; letter-spacing: 0.1em; }
  .guide-nav ol { margin: 0.8rem 0 0; padding: 0; list-style: none; }
  .guide-nav li { border-top: 1px solid var(--line); }
  .guide-nav li:last-child { border-bottom: 1px solid var(--line); }
  .guide-nav a { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.6rem 0; color: var(--muted); text-decoration: none; transition: color 150ms ease; }
  .guide-nav a:hover { color: var(--primary); }
  .guide-nav-index { color: #8a97b8; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; transition: background-color 150ms ease, color 150ms ease; }
  .guide-nav a.is-active { color: var(--ink); font-weight: 800; }
  .guide-nav a.is-active .guide-nav-index { color: var(--primary); }
  .guide-nav a.is-read .guide-nav-index { border-radius: 999px; background: var(--progress); padding: 0.1rem 0.35rem; color: var(--ink); }
  .guide-content > section { scroll-margin-top: 2rem; }
  .guide-content > section + section { margin-top: clamp(3rem, 7vw, 6rem); }
  .guide-section-head { margin-bottom: 0.25rem; }
  .guide-section-index { display: flex; align-items: center; gap: 0.6rem; color: var(--primary); font-family: "Manrope", var(--font-sans); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em; }
  .guide-section-index::after { width: 2rem; height: 3px; border-radius: 999px; background: var(--primary); content: ""; }
  .guide-content h2, .guide-content h3 { color: var(--ink); font-family: "Manrope", var(--font-sans); font-weight: 800; letter-spacing: -0.03em; }
  .guide-content h2 { max-width: 24ch; margin-top: 0.5rem; font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.08; text-wrap: balance; }
  .guide-content p { margin-top: 1rem; color: var(--muted); line-height: 1.7; text-wrap: pretty; }
  .guide-content p strong { color: var(--ink); }
  .guide-prose > p:first-of-type { color: var(--ink); font-size: 1.075rem; }
  .guide-block { margin-top: 1.75rem; }
  .guide-block + .guide-block { margin-top: 2rem; }
  .guide-block h3 { font-size: 1.05rem; }
  .guide-key-points { border: 1px solid var(--line); border-radius: 0.75rem; background: var(--blue); padding: 1.25rem; }
  .guide-key-points h3 { color: var(--primary-hover); }
  .guide-key-points ul { display: grid; gap: 0.8rem; margin: 1rem 0 0; padding: 0; list-style: none; }
  .guide-key-points li { display: grid; grid-template-columns: 0.6rem 1fr; column-gap: 0.75rem; align-items: start; color: var(--ink); transition: transform 200ms cubic-bezier(0.25, 1, 0.5, 1); }
  .guide-key-points li:hover { transform: translateX(0.3rem); }
  .guide-key-points li::before { width: 0.55rem; height: 0.55rem; margin-top: 0.5rem; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px rgb(18 111 196 / 18%); content: ""; transition: box-shadow 200ms cubic-bezier(0.25, 1, 0.5, 1); }
  .guide-key-points li:hover::before { box-shadow: 0 0 0 5px rgb(18 111 196 / 14%); }
  .guide-key-points li strong { color: var(--primary-hover); }
  .guide-key-points li strong, .guide-key-points li span { grid-column: 2; }
  .guide-key-points li span { color: var(--muted); line-height: 1.6; }
  .guide-key-points li strong + span { margin-top: 0.2rem; }
  .guide-list-lead { color: var(--ink) !important; font-weight: 700; }
  .guide-key-points--long { margin-inline: -1.5rem; border: 0; background: var(--ink); padding: clamp(1.25rem, 4vw, 2rem); color: #ffffff; }
  .guide-key-points--long h3, .guide-key-points--long .guide-list-lead, .guide-key-points--long li strong { color: #ffffff !important; }
  .guide-key-points--long ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; border-bottom: 1px solid var(--muted); }
  .guide-key-points--long li { grid-template-columns: 2.25rem 1fr; gap: 0.2rem 0.75rem; border-top: 1px solid var(--muted); padding: 1rem 0; transition: background-color 200ms cubic-bezier(0.25, 1, 0.5, 1); }
  .guide-key-points--long li::before { display: none; }
  .guide-key-points--long li strong, .guide-key-points--long li span, .guide-key-points--long li details { grid-column: 2; color: #ffffff; }
  .guide-key-points--long .guide-list-number { grid-row: 1 / span 2; grid-column: 1; color: var(--progress); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; transition: transform 200ms cubic-bezier(0.25, 1, 0.5, 1); }
  .guide-key-points--long summary { display: flex; justify-content: space-between; gap: 1rem; color: #ffffff; cursor: pointer; font-weight: 800; list-style: none; }
  .guide-key-points--long summary::-webkit-details-marker { display: none; }
  .guide-key-points--long summary::after { color: var(--progress); content: "+"; font-size: 1.15rem; line-height: 1; transition: transform 200ms cubic-bezier(0.25, 1, 0.5, 1); }
  .guide-key-points--long details[open] summary::after { transform: rotate(45deg); }
  .guide-key-points--long details[open] p { margin-top: 0.55rem; color: var(--line); animation: guide-answer-in 250ms cubic-bezier(0.25, 1, 0.5, 1); }
  .guide-key-points--long li:hover, .guide-key-points--long li:focus-within { background: var(--primary-hover); }
  .guide-key-points--long li:hover .guide-list-number, .guide-key-points--long li:focus-within .guide-list-number { transform: translateX(0.25rem); }
  .guide-sequence { margin-inline: -1rem; border-radius: 0.75rem; background: var(--primary); padding: clamp(1.25rem, 4vw, 2rem); }
  .guide-sequence h3 { color: #ffffff; }
  .guide-sequence ol { margin: 1rem 0 0; padding: 0; border-bottom: 1px solid rgb(255 255 255 / 28%); list-style: none; }
  .guide-sequence li { display: grid; grid-template-columns: minmax(7rem, max-content) 1fr; gap: 1rem; align-items: start; border-top: 1px solid rgb(255 255 255 / 28%); padding: 1rem 0; transition: background-color 200ms cubic-bezier(0.25, 1, 0.5, 1); }
  .guide-sequence li strong { width: fit-content; border-radius: 999px; background: var(--progress); padding: 0.3rem 0.65rem; color: var(--ink); font-size: 0.82rem; transition: transform 200ms cubic-bezier(0.25, 1, 0.5, 1); }
  .guide-sequence li p { margin: 0; color: #ffffff; }
  .guide-sequence li:hover { background: rgb(16 26 53 / 18%); }
  .guide-sequence li:hover strong { transform: translateX(0.3rem); }
  .guide-timeline { background: var(--ink); }
  .guide-comparison dl { margin: 1rem 0 0; }
  .guide-comparison dl > div { display: grid; grid-template-columns: minmax(8rem, 0.35fr) 1fr; }
  .guide-comparison dl > div:first-child { border-radius: 0.75rem 0.75rem 0 0; overflow: hidden; }
  .guide-comparison dl > div:last-child { border-radius: 0 0 0.75rem 0.75rem; overflow: hidden; }
  .guide-comparison dt { background: var(--primary); padding: 1rem; color: #ffffff; font-weight: 800; transition: background-color 200ms cubic-bezier(0.25, 1, 0.5, 1), color 200ms cubic-bezier(0.25, 1, 0.5, 1); }
  .guide-comparison dl > div:nth-child(even) dt { background: var(--primary-hover); }
  .guide-comparison dd { margin: 0; background: var(--blue); padding: 1rem; color: var(--muted); line-height: 1.6; transition: background-color 200ms cubic-bezier(0.25, 1, 0.5, 1); }
  .guide-comparison dl > div:hover dt { background: var(--progress); color: var(--ink); }
  .guide-comparison dl > div:hover dd { background: #ffffff; }
  .guide-callout { border: 0; border-radius: 0.75rem; background: var(--progress); padding: 1.5rem; }
  .guide-callout p:first-of-type { margin-top: 0.5rem; }
  .guide-callout p { color: var(--ink); }
  .guide-misconception { background: var(--primary-hover); }
  .guide-misconception h3, .guide-misconception p { color: #ffffff; }
  .guide-key-point { margin-top: 1.75rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--blue); padding: 1.1rem 1.25rem; }
  .guide-key-point strong { color: var(--primary); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
  .guide-key-point p { margin: 0.35rem 0 0; color: var(--ink); font-weight: 600; }
  .guide-checks { margin-top: 2rem; border-radius: 0.75rem; background: var(--ink); padding: 1.3rem 1.5rem; }
  .guide-checks h3 { color: #ffffff; font-size: 1rem; }
  .guide-checks details { border-top: 1px solid var(--muted); }
  .guide-checks details:first-of-type { margin-top: 1rem; }
  .guide-checks summary { display: flex; justify-content: space-between; gap: 1rem; margin: 0 -0.5rem; border-radius: 0.35rem; padding: 0.95rem 0.5rem; color: #ffffff; cursor: pointer; font-weight: 700; list-style: none; transition: background-color 200ms cubic-bezier(0.25, 1, 0.5, 1); }
  .guide-checks summary:hover { background: var(--primary-hover); }
  .guide-checks summary::-webkit-details-marker { display: none; }
  .guide-checks summary::after { color: var(--progress); content: "+"; font-size: 1.15rem; line-height: 1; transition: transform 200ms cubic-bezier(0.25, 1, 0.5, 1); }
  .guide-checks details[open] summary::after { transform: rotate(45deg); }
  .guide-checks details[open] p { margin: 0; padding: 0 0 1rem; color: var(--line); animation: guide-answer-in 250ms cubic-bezier(0.25, 1, 0.5, 1); }
  .guide-sources { margin-top: 4rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
  .guide-sources strong { color: var(--ink); font-size: 0.82rem; }
  .guide-sources p { margin-top: 0.4rem; font-size: 0.85rem; }
  .nova-guide-chat { position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 10; }
  .nova-guide-toggle { display: inline-flex; align-items: center; gap: 0.5rem; border: 0; border-radius: 999px; background: var(--ink); padding: 0.55rem 0.9rem 0.55rem 0.6rem; color: #ffffff; font: inherit; font-size: 0.85rem; font-weight: 800; cursor: pointer; box-shadow: 0 12px 30px rgb(16 26 53 / 24%); }
  .nova-guide-toggle[hidden] { display: none; }
  .nova-guide-toggle img { width: 2rem; height: 2rem; }
  .nova-guide-panel { display: grid; width: min(24rem, calc(100vw - 2rem)); height: min(34rem, calc(100vh - 2rem)); grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid var(--line); border-radius: 0.75rem; background: #ffffff; box-shadow: 0 20px 60px rgb(16 26 53 / 22%); }
  .nova-guide-panel[hidden] { display: none; }
  .nova-guide-panel > header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0.9rem 1rem; }
  .nova-guide-heading { display: flex; align-items: center; gap: 0.55rem; }
  .nova-guide-heading img { width: 2.25rem; height: 2.25rem; object-fit: contain; }
  .nova-guide-panel header strong, .nova-guide-panel header span { display: block; }
  .nova-guide-panel header strong { color: var(--ink); font-size: 0.9rem; }
  .nova-guide-panel header span { margin-top: 0.1rem; color: var(--muted); font-size: 0.74rem; }
  .nova-guide-panel header button { border: 0; background: transparent; color: var(--muted); font-size: 1.35rem; cursor: pointer; }
  .nova-guide-messages { display: flex; min-height: 0; flex-direction: column; gap: 0.7rem; overflow-y: auto; padding: 1rem; background: var(--blue); }
  .nova-guide-messages .message { max-width: 90%; }
  .nova-guide-messages .message.assistant { grid-template-columns: 2rem minmax(0, 1fr); align-items: start; }
  .nova-guide-messages .citation-list { grid-column: 2; }
  .nova-message-mark { width: 2rem; height: 2rem; object-fit: contain; }
  .nova-guide-messages .bubble { border-color: var(--line); border-radius: 0.5rem; }
  .nova-guide-messages .message.user .bubble { border-color: var(--primary); background: var(--primary); }
  .nova-empty-mark { width: 3rem; height: 3rem; margin: 0 auto 0.2rem; object-fit: contain; }
  .nova-guide-form { display: flex; gap: 0.5rem; border-top: 1px solid var(--line); padding: 0.7rem; }
  .nova-guide-form input { min-width: 0; flex: 1; border-color: var(--line); }
  .nova-guide-form .button { background: var(--button); border-color: var(--button); }

  @keyframes guide-hero-sprint {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }

  @keyframes guide-answer-in {
    from { opacity: 0; transform: translateY(-0.4rem); clip-path: inset(0 0 100%); }
    to { opacity: 1; transform: translateY(0); clip-path: inset(0); }
  }

  @media (max-width: 760px) {
    .guide-layout { grid-template-columns: 1fr; }
    .guide-nav { position: static; }
    .guide-nav ol { display: flex; gap: 0.65rem; overflow-x: auto; padding-bottom: 0.5rem; }
    .guide-nav li, .guide-nav li:last-child { flex: 0 0 auto; border: 0; }
    .guide-nav a { border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 0.75rem; white-space: nowrap; }
    .guide-key-points--long ul { grid-template-columns: 1fr; }
    .guide-sequence li { grid-template-columns: 1fr; gap: 0.5rem; }
    .guide-comparison dl > div { grid-template-columns: 1fr; gap: 0.3rem; }
    .nova-guide-toggle span { display: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    .guide-hero::after, .guide-key-points--long details[open] p, .guide-checks details[open] p { animation: none; }
    .guide-key-points li, .guide-key-points li::before, .guide-nav a, .guide-nav-index, .guide-checks summary, .guide-key-points--long li, .guide-key-points--long .guide-list-number, .guide-key-points--long summary::after, .guide-sequence li, .guide-sequence li strong, .guide-comparison dt, .guide-comparison dd, .guide-checks summary::after { transition: none; }
  }
}
