.home-page {
  isolation: isolate;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[data-theme="dark"] .home-page { --bg: #151a1e; --card: #1d2429; --card-2: #252e35; }
.home-page *, .home-page *::before, .home-page *::after { box-sizing: border-box; }
.home-page a { color: inherit; text-decoration: none; }
.home-page button { font: inherit; }
.home-page svg { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.home-page a:focus-visible, .home-page button:focus-visible { outline: 3px solid var(--primary); outline-offset: 5px; }
.home-page [hidden] { display: none !important; }
.home-shell { position: relative; z-index: 1; width: min(1200px, calc(100% - 80px)); margin: 0 auto; }
.home-stationery { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.stationery-paper { --paper-ink: var(--primary); --paper-turn: -12deg; position: absolute; top: 28%; left: 2%; width: 44px; height: 58px; border: 1px solid color-mix(in srgb, var(--paper-ink) 28%, transparent); border-radius: 3px; background: color-mix(in srgb, var(--card) 65%, transparent); opacity: .65; transform: rotate(var(--paper-turn)); animation: paper-sway 22s ease-in-out infinite; }
.stationery-paper::before { content: ""; position: absolute; top: -1px; right: -1px; width: 11px; height: 11px; background: var(--bg); border-left: 1px solid color-mix(in srgb, var(--paper-ink) 28%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--paper-ink) 28%, transparent); border-radius: 0 2px 0 2px; }
.stationery-paper::after { content: ""; position: absolute; inset: 19px 9px 10px; background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--paper-ink) 25%, transparent) 0 1px, transparent 1px 8px); }
.stationery-paper:nth-child(2) { --paper-ink: var(--info-fg); --paper-turn: 9deg; top: 15%; right: 2%; left: auto; width: 56px; height: 72px; animation-duration: 26s; animation-delay: -9s; }
.stationery-paper:nth-child(3) { --paper-ink: var(--warn-fg); --paper-turn: 14deg; top: auto; bottom: 5%; left: 34%; width: 40px; height: 52px; animation-duration: 24s; animation-delay: -16s; }
.stationery-paper:nth-child(4) { --paper-turn: -8deg; top: auto; bottom: 9%; right: 7%; left: auto; width: 36px; height: 48px; animation-duration: 20s; animation-delay: -5s; }
.skip-link { position: fixed; top: 12px; left: 12px; padding: 10px 18px; background: var(--card); z-index: 5; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.home-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--border); }
.home-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: 0; }
.home-brand h1 { margin: 0; font: inherit; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 8px; background: var(--primary); color: var(--card); font-size: 19px; letter-spacing: 0; }
.home-nav { display: flex; gap: 12px; align-items: center; font-size: 14px; font-weight: 600; }
.home-nav a:hover, .text-link:hover, .home-footer a:hover { color: var(--primary); }
.theme-toggle { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
.theme-toggle .icon-sun, html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
.home-button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 48px; padding: 13px 21px; border-radius: 8px; font-size: 15px; font-weight: 650; border: 1px solid var(--border); background: var(--card); transition: background .18s, border-color .18s; }
.home-button svg { transition: transform .18s; }
.home-button:hover svg { transform: translateX(3px); }
.home-button.button-small { min-height: 38px; padding: 7px 14px; gap: 16px; font-size: 13px; }
.home-button.button-primary { background: var(--primary); color: var(--card); border-color: var(--primary); }
.home-button.button-primary:hover { background: var(--primary-2); color: #fff; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); align-items: center; gap: 56px; padding: 64px 0; animation: home-arrive .4s ease-out both; }
.hero-copy { min-width: 0; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 23px; color: var(--primary); font-size: 13px; font-weight: 650; letter-spacing: .8px; }
.eyebrow > span { width: 19px; height: 2px; background: currentColor; }
.hero-copy h1 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 26px; line-height: 1.4; font-weight: 750; letter-spacing: 0; }
.hero-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.hero-actions .button-primary { width: auto; min-width: 144px; justify-content: space-between; min-height: 48px; padding: 9px 12px 9px 20px; border-radius: 5px; background: color-mix(in srgb, var(--primary) 6%, var(--card)); border-color: color-mix(in srgb, var(--primary) 65%, var(--border)); color: var(--primary); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--primary) 10%, transparent); }
.hero-actions .button-primary:hover { background: var(--primary-2); color: #fff; border-color: var(--primary); }
.login-arrow { display: grid; place-items: center; width: 32px; height: 28px; border-left: 1px solid color-mix(in srgb, currentColor 22%, transparent); padding-left: 9px; }
.text-link { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 650; padding: 9px 0; }
.hero-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 19px 0 0; color: var(--muted); font-size: 12px; }
.hero-note svg { width: 15px; height: 15px; color: var(--primary); }
.workspace-preview { min-width: 0; margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 2px 3px rgba(0, 0, 0, .025), 0 14px 32px rgba(0, 0, 0, .055); overflow: hidden; scroll-margin-top: 24px; }
.preview-topbar { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 22px; background: var(--card-2); border-bottom: 1px solid var(--border); }
.preview-brand { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 13px; }
.preview-brand svg { color: var(--primary); width: 18px; }
.demo-label { padding: 2px 7px; background: var(--card-2); color: var(--muted); border-radius: 4px; font-size: 10px; white-space: nowrap; }
.preview-content { padding: 26px 24px 8px; }
.preview-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.preview-eyebrow { margin: 0 0 6px; color: var(--muted); letter-spacing: 0; font-size: 10px; font-weight: 600; }
.preview-heading h2 { margin: 0; font-size: 21px; letter-spacing: 0; }
.semester-label { color: var(--muted); font-size: 11px; border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; }
.preview-summary { display: flex; align-items: center; gap: 17px; margin: 21px 0 7px; padding-bottom: 13px; color: var(--muted); border-bottom: 1px solid var(--border); font-size: 11px; }
.preview-summary > span { display: inline-flex; align-items: center; gap: 5px; }
.preview-summary b { color: var(--fg); font-size: 12px; }
.preview-summary .preview-view { margin-left: auto; font-size: 10px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.demo-assignment { display: flex; align-items: center; gap: 12px; padding: 19px 0; border-bottom: 1px solid var(--border); }
.demo-assignment:last-child { border-bottom: 0; }
.demo-check { width: 17px; height: 17px; border: 1.5px solid var(--border); border-radius: 5px; flex-shrink: 0; }
.demo-check.checked { display: grid; place-items: center; background: var(--ok-bg); border-color: var(--ok-fg); color: var(--ok-fg); }
.demo-check svg { width: 12px; height: 12px; }
.demo-check.checked { animation: completion-press 10s cubic-bezier(.22, 1, .36, 1) infinite; }
.demo-check.checked path { stroke-dasharray: 24; animation: completion-check 10s ease-in-out infinite; }
.assignment-copy { min-width: 0; flex: 1; }
.assignment-copy p { margin: 0 0 5px; color: var(--muted); font-size: 11px; }
.assignment-copy h3 { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.due-tag { flex-shrink: 0; padding: 3px 7px; color: var(--muted); background: var(--card-2); font-size: 10px; border-radius: 5px; }
.due-tag.urgent { color: var(--warn-fg); background: var(--warn-bg); }
.due-tag.complete { color: var(--ok-fg); background: var(--ok-bg); animation: completion-label 10s ease-in-out infinite; }
.assignment-complete h3 { position: relative; width: fit-content; color: var(--muted); }
.assignment-complete h3::after { content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: currentColor; opacity: .5; transform-origin: left; pointer-events: none; animation: completion-strike 10s ease-in-out infinite; }
.preview-bottom { display: flex; align-items: center; gap: 8px; padding: 17px 0; color: var(--muted); font-size: 10px; }
.preview-bottom svg { width: 15px; height: 15px; color: var(--primary); }
.preview-bottom > span { margin-left: auto; }
.workspace-preview figcaption { padding: 12px 20px; border-top: 1px solid var(--border); background: var(--card-2); color: var(--muted); font-size: 10px; text-align: center; }
.home-features { padding: 0 0 52px; scroll-margin-top: 28px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; margin-bottom: 23px; }
.section-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.6px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.home-feature { padding: 25px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.feature-icon { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 17px; color: var(--primary); border-radius: 9px; background: color-mix(in srgb, var(--primary) 9%, var(--card)); }
.home-feature h3 { margin: 0 0 9px; font-size: 16px; }
.home-feature p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.feature-caption { display: block; margin-top: 20px; color: var(--primary); font-size: 11px; font-weight: 650; }
.home-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
.home-stats > div { --stat-accent: var(--primary); min-width: 0; min-height: 160px; padding: 20px 24px 24px; border: 1px solid var(--border); border-top: 2px solid var(--stat-accent); border-radius: 8px; background: var(--card); box-shadow: 0 2px 3px rgba(0, 0, 0, .02), 0 6px 16px rgba(0, 0, 0, .035); transition: transform .2s cubic-bezier(.22, 1, .36, 1), border-color .2s; }
.home-stats > div:nth-child(2) { --stat-accent: var(--ok-fg); }
.home-stats > div:nth-child(3) { --stat-accent: var(--info-fg); }
.home-stats > div:nth-child(4) { --stat-accent: var(--warn-fg); }
.home-stats dt { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; font-size: 13px; font-weight: 500; color: var(--muted); }
.stat-icon { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 8px; color: var(--stat-accent); background: color-mix(in srgb, var(--stat-accent) 8%, transparent); }
.stat-icon svg { width: 18px; height: 18px; }
.home-stats dd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace; font-size: 48px; line-height: 1.1; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0; overflow-wrap: anywhere; }
.home-stats dd span:not([data-traffic-stat]) { margin-left: auto; font-family: ui-sans-serif, system-ui, "Microsoft JhengHei", sans-serif; font-size: 12px; color: var(--muted); font-weight: 400; }
.home-footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0 28px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.home-footer nav { display: flex; gap: 23px; }
@media (max-width: 1000px) {
  .home-shell { width: calc(100% - 48px); }
  .home-hero { gap: 30px; padding: 60px 0; }
  .preview-content { padding: 22px 18px 8px; }
  .home-stats > div { padding: 20px; }
}
@media (max-width: 760px) {
  .stationery-paper:first-child { left: -15px; top: 12%; }
  .stationery-paper:nth-child(2) { right: -20px; top: 60%; }
  .stationery-paper:nth-child(n + 3) { display: none; }
  .home-header { padding: 19px 0; }
  .home-nav { gap: 12px; }
  .home-hero { grid-template-columns: 1fr; padding: 42px 0 46px; gap: 35px; }
  .hero-note { margin-top: 15px; }
  .workspace-preview { width: 100%; }
  .preview-content { padding: 22px 20px 8px; }
  .assignment-copy h3 { font-size: 13px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 7px; }
  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .home-feature { display: grid; grid-template-columns: 37px 1fr; column-gap: 16px; padding: 22px; }
  .feature-icon { grid-row: 1 / 4; margin: 0; }
  .home-feature h3, .home-feature p, .feature-caption { grid-column: 2; }
  .feature-caption { margin-top: 12px; }
  .home-features { padding-bottom: 30px; }
  .home-stats > div { min-height: 152px; padding: 20px 24px; }
}
@media (max-width: 440px) {
  .home-shell { width: calc(100% - 36px); }
  .home-brand { font-size: 14px; gap: 9px; }
  .brand-mark { width: 32px; height: 32px; font-size: 17px; border-radius: 8px; }
  .home-nav { gap: 9px; }
  .home-button.button-small { padding: 7px 10px; gap: 8px; }
  .eyebrow { font-size: 11px; margin-bottom: 18px; }
  .hero-actions { gap: 8px 16px; }
  .home-button.button-primary { font-size: 14px; }
  .home-stats > div { min-height: 144px; padding: 16px; }
  .home-stats { gap: 12px; }
  .home-stats dt { font-size: 12px; gap: 6px; }
  .stat-icon { flex-basis: 28px; height: 28px; }
  .stat-icon svg { width: 16px; height: 16px; }
  .home-stats dd { font-size: 40px; }
  .preview-topbar { padding: 14px 15px; }
  .preview-content { padding: 20px 16px 8px; }
  .preview-summary { gap: 12px; }
  .preview-summary .preview-view { font-size: 9px; }
  .demo-assignment { gap: 8px; flex-wrap: wrap; }
  .assignment-copy { flex-basis: calc(100% - 25px); }
  .due-tag { margin-left: 25px; }
  .home-footer { flex-direction: column; gap: 12px; }
  .home-footer nav { flex-wrap: wrap; gap: 20px; }
}
@keyframes home-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes paper-sway { 0%, 100% { transform: translate(0, 0) rotate(var(--paper-turn)); } 50% { transform: translate(7px, -14px) rotate(calc(var(--paper-turn) + 5deg)); } }
@media (hover: hover) and (pointer: fine) {
  .home-stats > div:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--stat-accent) 35%, var(--border)); }
}
@keyframes completion-press { 0%, 8%, 100% { transform: scale(.96); } 15% { transform: scale(.9); } 20% { transform: scale(1.12); } 25%, 88% { transform: scale(1); } }
@keyframes completion-check { 0%, 8% { stroke-dashoffset: 24; opacity: 0; } 12% { stroke-dashoffset: 24; opacity: 1; } 23%, 88% { stroke-dashoffset: 0; opacity: 1; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes completion-label { 0%, 18%, 100% { opacity: 0; transform: translateY(3px); } 26%, 88% { opacity: 1; transform: translateY(0); } 96% { opacity: 0; transform: translateY(0); } }
@keyframes completion-strike { 0%, 20% { transform: scaleX(0); opacity: .5; } 29%, 88% { transform: scaleX(1); opacity: .5; } 96%, 100% { transform: scaleX(1); opacity: 0; } }
html.motion-paused .stationery-paper,
html.motion-paused .demo-check.checked,
html.motion-paused .demo-check.checked path,
html.motion-paused .assignment-complete h3::after,
html.motion-paused .due-tag.complete { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .home-stationery { display: none; }
  .stationery-paper { animation: none; }
  .home-hero, .demo-check.checked, .demo-check.checked path, .due-tag.complete, .assignment-complete h3::after { animation: none; }
  .home-button, .home-button svg, .home-stats > div, .workspace-preview { transition: none; }
  .home-button:hover svg, .home-stats > div:hover { transform: none; }
}
