@font-face {
  font-family: Inter;
  src: url("assets/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2191, U+2193, U+2212;
}

:root {
  color-scheme: light dark;
  --paper: light-dark(#fbfcfa, #101916);
  --ink: light-dark(#122e2a, #e7faf3);
  --muted: light-dark(#425d54, #abc4b9);
  --rule: light-dark(#cfded6, #344a40);
  --hero: light-dark(#deeee6, #172c26);
  --preview: light-dark(#edf3ee, #18251f);
  --accent: light-dark(#16634f, #99dfc2);
  --on-accent: light-dark(#fff, #132c24);
  --gold: light-dark(#88550c, #ffc76d);
  --blue: light-dark(#355c7e, #9dbfdc);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  background: var(--paper, #fbfcfa);
  color: var(--ink, #122e2a);
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, figure { margin: 0; }
body { line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[id] { scroll-margin-top: 1rem; }

.wrap { width: min(100% - 3rem, 73.5rem); margin-inline: auto; }
.skip-link { position: fixed; z-index: 3; top: .75rem; left: .75rem; padding: .6rem 1rem; background: var(--paper); }
.skip-link:not(:focus) { clip-path: inset(50%); }

.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 4.625rem; display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.5rem; align-items: center; }
.home-link { display: inline-flex; justify-self: start; align-items: center; gap: .65rem; font-size: 1.05rem; font-weight: 720; }
.site-nav, .site-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 1.7rem; }
.site-nav a { padding-block: .65rem; color: var(--muted); font-size: .9rem; }
.site-nav a:hover, .site-footer a:hover, .release-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .26em; }
.theme-toggle { display: grid; place-items: center; justify-self: end; width: 2.5rem; height: 2.5rem; background: transparent; border: 1px solid var(--rule); border-radius: 50%; cursor: pointer; }
.theme-toggle:hover { background: var(--preview); }
.theme-toggle .sun-icon, .mark-dark { display: none; }
:root[data-theme="dark"] .mark-light, :root[data-theme="dark"] .moon-icon { display: none; }
:root[data-theme="dark"] .mark-dark, :root[data-theme="dark"] .sun-icon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mark-light, :root:not([data-theme="light"]) .moon-icon { display: none; }
  :root:not([data-theme="light"]) .mark-dark, :root:not([data-theme="light"]) .sun-icon { display: block; }
}

.hero { overflow: hidden; background: var(--hero); border-bottom: 1px solid var(--rule); }
.hero-inner { min-height: 37rem; position: relative; display: flex; align-items: center; isolation: isolate; }
.hero-art { position: absolute; z-index: -1; width: min(58%, 39rem); max-width: none; height: auto; right: -1.5rem; bottom: -2.5rem; }
.hero-copy { padding-block: 3.5rem; width: min(51%, 34rem); }
.product-category { color: var(--accent); font-size: .95rem; font-weight: 700; margin-bottom: 1rem; }
.wordmark { width: 100%; height: auto; }
.hero-description { color: var(--muted); font-size: 1.1rem; line-height: 1.9; max-width: 25rem; margin-top: 1.55rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.hero .actions { margin-top: 1.7rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 3.1rem; padding: .65rem .95rem; border: 1px solid transparent; border-radius: 7px; font-size: .92rem; font-weight: 650; line-height: 1.35; white-space: nowrap; }
.button svg { flex: none; width: 1.05rem; height: 1.05rem; }
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-secondary { border-color: var(--accent); color: var(--accent); }
.button:hover { filter: brightness(.94); }
.release-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-top: 1.05rem; color: var(--muted); font-size: .83rem; }
.release-meta span + span { border-left: 1px solid var(--rule); padding-left: .75rem; }

.section { padding-block: 4.5rem; }
.section h2 { font-size: 2.25rem; line-height: 1.25; font-weight: 730; margin-bottom: 1.65rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
.feature { padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.feature > svg { width: 1.6rem; height: 1.6rem; margin-bottom: .7rem; }
.feature-calc > svg { color: var(--accent); }
.feature-periodic > svg { color: var(--gold); }
.feature-structures > svg { color: var(--blue); }
.feature h3, .preview-panel h3 { font-size: 1.15rem; line-height: 1.4; font-weight: 700; }
.feature p, .preview-panel p { color: var(--muted); font-size: .94rem; margin-top: .6rem; line-height: 1.75; }

.preview { background: var(--preview); border-block: 1px solid var(--rule); }
.preview-tabs { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.5rem; }
.preview-tabs button { padding: .55rem .8rem; background: transparent; border: 1px solid var(--rule); border-radius: 6px; cursor: pointer; font-size: .9rem; }
.preview-tabs button:hover { border-color: var(--accent); }
.preview-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.preview-panel { display: grid; grid-template-columns: minmax(13rem, .65fr) minmax(0, 1.35fr); gap: 2rem; align-items: center; border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.preview-panel + .preview-panel { margin-top: 1.5rem; }
.preview-panel h3 { font-size: 1.65rem; }
.preview-panel img { width: min(100%, 43rem); height: auto; justify-self: end; }

.download { background: #132f28; color: #e7faf3; }
.download .download-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.8rem; flex-wrap: wrap; }
.download h2 { margin-bottom: .65rem; }
.download p { color: #bdd9ce; }
.button-download { background: #a9e8cc; color: #122e2a; }
.release-link { padding: .55rem .35rem; font-size: .92rem; }
.release-link:hover { color: #a9e8cc; }
.download :focus-visible { outline-color: #ffc76d; }

.site-footer { padding-block: 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem 2rem; }
.site-footer p, .site-footer nav { font-size: .83rem; color: var(--muted); }
.site-footer nav { gap: 1rem; }
.footer-inner .credit { margin-inline-start: auto; }

@media (max-width: 56rem) {
  .hero-inner { min-height: 32rem; }
  .hero-art { right: -1.5rem; bottom: -1rem; }
  .hero-description { font-size: 1rem; }
  .feature-grid { gap: 1.55rem; }
}

@media (min-width: 43.001rem) and (max-height: 48rem) {
  .hero-inner { min-height: 27rem; }
  .hero-art { width: min(54%, 30rem); }
  .features { padding-top: 3rem; }
}

@media (max-width: 43rem) {
  .wrap { width: min(100% - 2rem, 33rem); }
  .header-inner { min-height: 3.75rem; gap: .65rem; }
  .home-link { gap: .35rem; font-size: .85rem; }
  .home-link img { width: 1.8rem; height: 1.8rem; }
  .site-nav { gap: .85rem; }
  .site-nav a { font-size: .8rem; }
  .theme-toggle { width: 2.25rem; height: 2.25rem; }
  .hero-inner { min-height: 0; flex-direction: column; }
  .hero-copy { width: 100%; order: -1; padding: 2.25rem 0 .4rem; }
  .product-category { font-size: .85rem; margin-bottom: .8rem; }
  .wordmark { width: min(100%, 28rem); }
  .hero-description { margin-top: .95rem; }
  .hero .actions { margin-top: 1.15rem; }
  .release-meta { margin-top: .7rem; }
  .hero-art { position: relative; inset: auto; z-index: auto; align-self: flex-end; width: min(100%, 21rem); margin: 0 0 -.6rem; }
  .section { padding-block: 2.7rem; }
  .section h2 { font-size: 1.75rem; margin-bottom: 1.15rem; }
  .feature-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .feature { display: grid; grid-template-columns: 1.7rem 1fr; column-gap: .7rem; }
  .feature > svg { margin-bottom: 0; }
  .feature p { grid-column: 2; margin-top: .35rem; }
  .preview-panel { grid-template-columns: 1fr; gap: 1rem; }
  .preview-panel h3 { font-size: 1.25rem; }
  .footer-inner .credit { margin-inline-start: 0; }
}

@media (max-width: 43rem) and (max-height: 48rem) {
  .hero-copy { padding-top: 1.65rem; }
  .hero-art { width: min(100%, 15rem); }
  .features { padding-top: 2rem; }
}

@media (max-width: 24rem) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .site-nav { justify-content: center; gap: .55rem; }
  .site-nav a { font-size: .75rem; }
  .home-link span { display: none; }
  .hero-copy { padding-top: 1.65rem; }
  .hero .button { font-size: .85rem; gap: .4rem; padding-inline: .6rem; }
  .hero-art { width: min(90%, 13rem); }
}

@media (max-width: 24rem) and (max-height: 40rem) {
  .hero-copy { padding-top: 1.25rem; }
  .hero-description { margin-top: .75rem; }
  .hero .actions { margin-top: .85rem; }
  .hero-art { width: 8.75rem; align-self: center; }
  .features { padding-top: 1.4rem; }
}
