/* LuaStudio: restrained dark surfaces, clear editorial layout, and a flat teal accent. */
body.luastudio-page {
    color-scheme: dark;
    --theme-accent: #39b89c;
    --theme-on-accent: #071b17;
    --theme-link: #61d3b8;
    --theme-bg: #101413;
    --theme-surface: #171d1b;
    --theme-surface-soft: #131917;
    --theme-border: #303a36;
    --theme-text: #f3f5f4;
    --theme-muted: #a6b0ac;
    --theme-code-bg: #0b100e;
    --theme-code-text: #e2eee9;
    --theme-shadow-rgb: 0, 0, 0;
    color: var(--theme-text);
    background: var(--theme-bg);
}
.luastudio-page *, .luastudio-page *::before, .luastudio-page *::after { box-sizing: border-box; }
.luastudio-page { min-height: 100vh; }
.luastudio-page :focus-visible { outline: 3px solid var(--theme-accent); outline-offset: 3px; }
.luastudio-page .site-navbar { background: #0d1110; border-bottom: 1px solid var(--theme-border); }
.luastudio-page .site-modern-bg { display: none !important; }
.luastudio-page .site-theme-toggle { display: none !important; }
.luastudio-page .site-navbar__links { gap: .2rem; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.luastudio-page .site-navbar__links a { border-radius: 4px; }
.luastudio-page a { text-underline-offset: .18em; }
.lsu-shell { width: min(1240px, calc(100% - 3rem)); margin-inline: auto; }

/* Hero */
.lsu-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(3.5rem, 5vw, 5rem); }
.lsu-hero__copy { max-width: 600px; }
.lsu-eyebrow { display: flex; align-items: center; gap: .65rem; margin: 0 0 1rem; color: var(--theme-accent); font-size: .72rem; font-weight: 800; letter-spacing: .13em; line-height: 1.5; text-transform: uppercase; }
.lsu-eyebrow span { width: .55rem; height: .55rem; flex: 0 0 auto; border-radius: 50%; background: var(--theme-accent); }
.lsu-eyebrow i { color: var(--theme-text); font-style: normal; }
.lsu-hero h1 { max-width: 12ch; margin: 0; font: 750 clamp(3.3rem, 5.15vw, 4.8rem)/1.02 var(--font-heading, var(--font-ui)); letter-spacing: -.06em; }
.lsu-hero h1 em { color: var(--theme-accent); font-style: normal; }
.lsu-hero__lead { max-width: 34rem; margin: 1.25rem 0 0; color: var(--theme-muted); font-size: clamp(1.04rem, 1.5vw, 1.18rem); line-height: 1.72; }
.lsu-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 1.35rem; }
.lsu-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: .55rem; padding: .7rem 1rem; border: 1px solid #46514c; border-radius: 5px; background: #1a211e; color: var(--theme-text); font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none; transition: background-color .16s ease, color .16s ease, border-color .16s ease; }
.lsu-button:hover { border-color: var(--theme-accent); background: #202a26; }
.lsu-button--primary { border-color: var(--theme-accent); background: var(--theme-accent); color: var(--theme-on-accent); }
.lsu-button--primary:hover { border-color: #58cfb2; background: #58cfb2; color: var(--theme-on-accent); }
.lsu-button[disabled] { opacity: .58; cursor: not-allowed; }
.lsu-facts { display: flex; flex-wrap: wrap; gap: 1.1rem; color: #c0c9c5; font-size: .8rem; }
.lsu-facts span { display: inline-flex; align-items: center; gap: .45rem; }
.lsu-facts span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--theme-accent); }
.lsu-preview { min-width: 0; margin: 0; }
.lsu-preview__image { display: block; width: 100%; aspect-ratio: 1.62; object-fit: cover; object-position: center 12%; border: 1px solid #3b4641; border-radius: 6px; background: var(--theme-code-bg); }
.lsu-preview__caption { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .65rem; padding: .8rem .1rem 0; color: var(--theme-muted); font-size: .76rem; }
.lsu-preview__caption span:first-child { color: var(--theme-accent); font-family: var(--font-mono); font-weight: 800; }
.lsu-preview__caption strong { color: var(--theme-text); font-size: .83rem; }

/* Short product story */
.lsu-workflow { border-block: 1px solid var(--theme-border); background: #151b19; }
.lsu-workflow .lsu-shell { display: grid; grid-template-columns: repeat(3, 1fr); }
.lsu-workflow .lsu-shell > span { display: grid; gap: .35rem; padding: 1rem 1.5rem; border-right: 1px solid var(--theme-border); }
.lsu-workflow .lsu-shell > span:first-child { padding-left: 0; }
.lsu-workflow .lsu-shell > span:last-child { border-right: 0; }
.lsu-workflow small { color: var(--theme-accent); font: 700 .68rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.lsu-workflow strong { font: 700 .95rem var(--font-heading, var(--font-ui)); }
.lsu-section { padding-block: clamp(3rem, 4vw, 4rem); }
.lsu-section--soft { background: var(--theme-surface-soft); }
.lsu-section__heading { display: flex; flex-direction: column; align-items: flex-start; max-width: 720px; margin-bottom: 2.4rem; }
.lsu-section__heading h2, .lsu-requirements h2 { margin: .1rem 0 .65rem; font: 700 clamp(2rem, 4vw, 3.2rem)/1.1 var(--font-heading, var(--font-ui)); letter-spacing: -.05em; }
.lsu-section__heading > p:not(.lsu-eyebrow), .lsu-section__intro { max-width: 650px; margin: 0; color: var(--theme-muted); line-height: 1.75; }
.lsu-section__heading--split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); column-gap: clamp(2rem, 4vw, 3rem); align-items: end; max-width: none; margin-bottom: 2rem; }
.lsu-section__heading--split .lsu-eyebrow { grid-column: 1 / -1; }
.lsu-section__heading--split h2 { grid-column: 1; grid-row: 2; }
.lsu-section__heading--split > p:not(.lsu-eyebrow) { grid-column: 2; grid-row: 2; }
.lsu-section__heading--split h2 { font-size: clamp(2.1rem, 3.3vw, 2.8rem); }
.lsu-section__heading--split h2 em { color: var(--theme-accent); font-style: normal; }

/* Screenshots are the product proof; keep them large and unembellished. */
.lsu-screenshot-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: start; }
.lsu-screenshot-card { min-width: 0; margin: 0; }
.lsu-screenshot-card img { display: block; width: 100%; aspect-ratio: 1.46; object-fit: cover; object-position: top center; border: 1px solid #3b4641; border-radius: 6px; background: var(--theme-code-bg); }
.lsu-screenshot-card:nth-child(2) { margin-top: 2.5rem; }
.lsu-screenshot-card figcaption { display: grid; gap: .35rem; padding: .85rem .1rem 0; }
.lsu-screenshot-card figcaption strong { font: 700 1rem var(--font-heading, var(--font-ui)); }
.lsu-screenshot-card figcaption span { max-width: 38rem; color: var(--theme-muted); font-size: .88rem; line-height: 1.6; }

/* Capability bento: varied widths and solid surfaces create a stronger rhythm. */
.lsu-feature-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .85rem; }
.lsu-feature-grid article { display: grid; grid-template-columns: 2.2rem 1fr; column-gap: .9rem; align-content: start; grid-column: span 5; min-height: 165px; padding: 1.35rem; border: 1px solid var(--theme-border); border-radius: 8px; background: #151b19; transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.lsu-feature-grid article:hover { transform: translateY(-2px); border-color: #42665c; background: #18211e; }
.lsu-feature-grid article.lsu-feature-card--wide { grid-column: span 7; }
.lsu-feature-grid article > span { grid-row: span 2; display: grid; width: 2rem; height: 2rem; place-items: center; border: 1px solid #3b554c; border-radius: 5px; color: var(--theme-accent); font: 700 .68rem var(--font-mono); }
.lsu-feature-grid h3 { margin: .1rem 0 .45rem; font: 700 1.08rem var(--font-heading, var(--font-ui)); letter-spacing: -.015em; }
.lsu-feature-grid p { max-width: 38rem; margin: 0; color: var(--theme-muted); font-size: .91rem; line-height: 1.65; }

/* Release selection */
.lsu-download-heading { max-width: none; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; }
.lsu-download-heading > div { max-width: 700px; }
.lsu-download-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 1rem; align-items: start; }
.lsu-download-card { display: flex; min-width: 0; min-height: 0; flex-direction: column; align-items: flex-start; padding: 1.4rem; border: 1px solid var(--theme-border); border-radius: 8px; background: #151b19; }
.lsu-download-card:first-child { border-top: 3px solid var(--theme-accent); background: #19211e; }
.lsu-channel { display: inline-flex; align-items: center; min-height: 27px; padding: .25rem .55rem; border: 1px solid #45514c; color: #c0c9c5; font-size: .69rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.lsu-download-card:first-child .lsu-channel { border-color: var(--theme-accent); color: var(--theme-accent); }
.lsu-download-card h3 { margin: 1rem 0 .45rem; font: 700 1.15rem var(--font-heading, var(--font-ui)); letter-spacing: -.02em; }
.lsu-download-card p { margin: .45rem 0; color: var(--theme-muted); font-size: .9rem; line-height: 1.65; }
.lsu-download-card .lsu-button { width: 100%; margin-top: 1.1rem; }
.lsu-download-card .lsu-text-link { margin-top: .8rem; }
.lsu-checksum { display: block; max-width: 100%; margin: .8rem 0 1rem; overflow-wrap: anywhere; color: var(--theme-muted); font: .68rem/1.5 var(--font-mono); }
.lsu-muted, .lsu-integrity, .lsu-runtime-link { color: var(--theme-muted); font-size: .83rem !important; line-height: 1.65 !important; }
.lsu-integrity { display: flex; align-items: center; gap: .6rem; margin: 1.2rem 0 0; }
.lsu-integrity::before { content: "✓"; color: var(--theme-accent); font-weight: 900; }
.lsu-text-link { color: var(--theme-link); font-weight: 700; }

/* Release notes and archive */
.lsu-notes { max-height: none; overflow: visible; margin-top: 1rem; padding: 1.25rem; border: 1px solid var(--theme-border); background: #0d1210; color: var(--theme-code-text); }
.lsu-notes .markdown-body { color: inherit; font: .88rem/1.72 var(--font-mono); }
.lsu-notes .markdown-body > :first-child { margin-top: 0; }
.lsu-notes .markdown-body > :last-child { margin-bottom: 0; }
.lsu-notes .markdown-body h1, .lsu-notes .markdown-body h2, .lsu-notes .markdown-body h3 { margin: 1.15em 0 .45em; color: var(--theme-code-text); font: 700 1rem/1.4 var(--font-heading, var(--font-ui)); letter-spacing: 0; }
.lsu-notes .markdown-body p, .lsu-notes .markdown-body li { color: inherit; }
.lsu-notes .markdown-body a { color: var(--theme-link); }
.lsu-notes .markdown-body pre, .lsu-notes .markdown-body code { overflow-wrap: anywhere; }
.lsu-notes + .lsu-text-link { display: inline-block; margin-top: 1rem; }
.lsu-history-list { display: grid; gap: 0; margin-top: 2rem; border-top: 1px solid var(--theme-border); }
.lsu-history-card { padding: 1.5rem 0; border-bottom: 1px solid var(--theme-border); }
.lsu-history-card__top, .lsu-history-card__bottom { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; color: var(--theme-muted); font-size: .83rem; }
.lsu-history-card__top { justify-content: space-between; }
.lsu-history-card h3 { margin: .8rem 0 .4rem; font: 700 1.3rem var(--font-heading, var(--font-ui)); }
.lsu-history-card h3 small { margin-left: .35rem; color: var(--theme-muted); font: 500 .78rem var(--font-mono); }
.lsu-history-card > p { max-width: 820px; color: var(--theme-muted); line-height: 1.7; }
.lsu-history-card details { margin: .9rem 0; }
.lsu-history-card summary { cursor: pointer; color: var(--theme-link); font-weight: 700; }
.lsu-history-card .lsu-notes { margin-top: .8rem; }
.lsu-history-card__bottom { margin-top: 1rem; }
.lsu-history-card__bottom code { flex: 1; min-width: 260px; overflow-wrap: anywhere; color: var(--theme-muted); font: .7rem/1.5 var(--font-mono); }
.lsu-empty { margin: 2rem 0; padding: 1.6rem 0; border-block: 1px solid var(--theme-border); color: var(--theme-muted); }

/* Compact latest-release story with full notes available on demand. */
.lsu-whats-new { display: grid; grid-template-columns: minmax(250px, .7fr) minmax(0, 1.3fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.lsu-whats-new__release { position: sticky; top: 7rem; padding: 1.5rem; border: 1px solid var(--theme-border); border-top: 2px solid var(--theme-accent); border-radius: 8px; background: #151b19; }
.lsu-whats-new__release h2 { margin: .2rem 0 .35rem; font: 700 clamp(2rem, 3.5vw, 2.9rem)/1.08 var(--font-heading, var(--font-ui)); letter-spacing: -.05em; }
.lsu-whats-new__date { margin: 0 0 1.3rem; color: var(--theme-muted); }
.lsu-whats-new__content h3 { margin: 0 0 .65rem; font: 700 1.4rem/1.25 var(--font-heading, var(--font-ui)); }
.lsu-whats-new__content > p { margin: 0 0 1.3rem; color: var(--theme-muted); font-size: 1rem; line-height: 1.8; }
.lsu-whats-new__details { padding-top: 1.2rem; border-top: 1px solid var(--theme-border); }
.lsu-whats-new__details summary { cursor: pointer; color: var(--theme-link); font-weight: 700; }
.lsu-whats-new__content > .lsu-text-link { display: inline-block; margin-top: 1.2rem; }

/* Practical details */
.lsu-requirements { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2rem; align-items: center; }
.lsu-requirements ul { margin: 0; padding-left: 1.2rem; color: var(--theme-muted); line-height: 2; }
.lsu-runtime-link { padding-bottom: 2rem; }
.lsu-runtime-link a { color: var(--theme-link); }
.lsu-footer { padding: 1.3rem 0; border-top: 1px solid var(--theme-border); background: #0d1110; }
.lsu-footer > div { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; color: var(--theme-muted); font-size: .84rem; }
.lsu-footer a { color: var(--theme-link); }

@media (max-width: 900px) {
    .lsu-hero { grid-template-columns: 1fr; gap: 2.25rem; padding-block: 3.5rem; }
    .lsu-hero__copy { max-width: 700px; }
    .lsu-hero h1 { max-width: 14ch; font-size: clamp(3.3rem, 8vw, 4.7rem); }
    .lsu-preview { max-width: 800px; }
    .lsu-download-grid { grid-template-columns: 1fr 1fr; }
    .lsu-download-card:first-child { grid-column: span 2; }
    .lsu-whats-new { grid-template-columns: minmax(210px, .8fr) minmax(0, 1.2fr); gap: 2rem; }
    .lsu-whats-new__release { position: static; }
    .lsu-feature-grid article, .lsu-feature-grid article.lsu-feature-card--wide { grid-column: span 6; }
}
@media (max-width: 620px) {
    .lsu-shell { width: calc(100% - 1.5rem); }
    .lsu-hero { padding-block: 3.1rem; }
    .lsu-hero h1 { font-size: clamp(2.8rem, 12vw, 4.1rem); }
    .lsu-hero h1 br { display: none; }
    .lsu-actions { align-items: stretch; flex-direction: column; }
    .lsu-button { width: 100%; }
    .lsu-facts { gap: .55rem 1rem; }
    .lsu-preview__caption { grid-template-columns: auto 1fr; }
    .lsu-preview__caption span:last-child { grid-column: 2; }
    .lsu-workflow .lsu-shell { grid-template-columns: 1fr; }
    .lsu-workflow .lsu-shell > span, .lsu-workflow .lsu-shell > span:first-child { padding: .8rem 0; border-right: 0; border-bottom: 1px solid var(--theme-border); }
    .lsu-workflow .lsu-shell > span:last-child { border-bottom: 0; }
    .lsu-screenshot-grid { grid-template-columns: 1fr; gap: 2rem; }
    .lsu-screenshot-card:nth-child(2) { margin-top: 0; }
    .lsu-section__heading--split { display: flex; gap: 0; }
    .lsu-section__heading--split > p:not(.lsu-eyebrow) { margin-top: .3rem; }
    .lsu-feature-grid { grid-template-columns: 1fr; }
    .lsu-feature-grid article, .lsu-feature-grid article.lsu-feature-card--wide { grid-column: 1; min-height: 0; padding: 1.2rem; }
    .lsu-download-heading { grid-template-columns: 1fr; }
    .lsu-download-grid { grid-template-columns: 1fr; }
    .lsu-download-card:first-child { grid-column: auto; }
    .lsu-download-card { min-height: 0; }
    .lsu-download-card .lsu-button { margin-top: 1rem; }
    .lsu-requirements { grid-template-columns: 1fr; gap: .3rem; }
    .lsu-whats-new { grid-template-columns: 1fr; gap: 2rem; }
    .lsu-history-card__bottom { align-items: stretch; flex-direction: column; }
    .lsu-history-card__bottom code { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .luastudio-page *, .luastudio-page *::before, .luastudio-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
