@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* RediWM: precise typography, graphite surfaces and restrained red light. */
:root {
  --bg: #080a0d;
  --surface: #101319;
  --raised: #191e26;
  --line: #303640;
  --text: #f5f6fa;
  --muted: #a6adba;
  --red: #ff3b4e;
  --red-dark: #de263b;
  --display: 'Space Grotesk', 'Manrope', sans-serif;
  scrollbar-color: var(--red) var(--bg);
}

/* Fallback for browsers that only support WebKit scrollbar styling. */
@supports not (scrollbar-color: auto) {
  @media (forced-colors: none) {
    ::-webkit-scrollbar { width: 12px; height: 12px; }
    ::-webkit-scrollbar-track,
    ::-webkit-scrollbar-corner { background: var(--bg); }
    ::-webkit-scrollbar-thumb {
      background: var(--red);
      border: 3px solid var(--bg);
      border-radius: 999px;
    }
  }
}

body { background: var(--bg); }
.site-header {
  position: sticky;
  top: 0;
  height: 88px;
  background: #090b0ee6;
  border-bottom: 1px solid #929bb321;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.site-header::after {
  content: '';
  position: absolute;
  height: 1px;
  width: 46%;
  left: 27%;
  bottom: -1px;
  background: linear-gradient(90deg, transparent, #b8c4e03d, transparent);
  pointer-events: none;
}
.brand { font-family: 'Manrope', sans-serif; letter-spacing: -.055em; }
.brand-mark { box-shadow: 0 0 24px #fa263327; }
.desktop-nav { font-size: .875rem; gap: 30px; color: #aeb5c2; }
.desktop-nav a { position: relative; padding-block: 12px; }
.desktop-nav a::after {
  content: '';
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 4px;
  height: 1px;
  background: var(--red);
  transition: left .2s, right .2s;
}
.desktop-nav a:hover::after { left: 0; right: 0; }
.nav-actions { gap: 15px; }

/* Match the user's original outlined GitHub control. */
.nav-actions > .github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid #575b63;
  border-radius: 9px;
  background: #101114;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.github-link span { display: inline; }
.github-link .icon { width: 22px; height: 22px; }
.nav-actions > .github-link:hover {
  background: #1b1e24;
  border-color: #a5aab5;
  color: #fff;
  box-shadow: 0 0 0 3px #a5aab50a;
}
.nav-actions > .button-small { min-height: 48px; padding-inline: 20px; }
.button {
  border-radius: 8px;
  transition: transform .2s, box-shadow .2s, border-color .2s, background .2s;
}
.button-red {
  background: linear-gradient(180deg, #ed3447, #d62136);
  border: 1px solid #ff718078;
  box-shadow: inset 0 1px 0 #ffffff25, 0 5px 22px #e82b3e24;
}
.button-red:hover {
  background: linear-gradient(180deg, #ff4358, #e9273c);
  border-color: #ff95a0;
  box-shadow: inset 0 1px 0 #ffffff3a, 0 8px 30px #ec263e40;
}
.button-outline {
  background: linear-gradient(165deg, #23283399, #11151bcc);
  border-color: #646c7c66;
  box-shadow: inset 0 1px 0 #ffffff07;
}
.button-outline:hover { background: #252b35; border-color: #8e98ac; }

.hero {
  background: radial-gradient(ellipse at 83% 45%, #53182525, transparent 55%),
              linear-gradient(180deg, #0b0e14, #080a0d 90%);
  isolation: isolate;
}
.hero-grid { grid-template-columns: 43% 57%; min-height: 715px; padding-top: 32px; padding-bottom: 58px; }
.hero-copy { z-index: 5; }
.eyebrow { color: #b5becd; letter-spacing: .13em; font-size: .75rem; }
.red-line { width: 29px; box-shadow: 0 0 12px #ff334f66; }
.hero h1 {
  font-size: clamp(3.65rem, 5.6vw, 5.1rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -.075em;
  margin-block: 26px 29px;
}
.hero h1 .headline-lead {
  color: #f3f6ff;
  background: linear-gradient(175deg, #ffffff 24%, #d9e0ec 58%, #9ca9be 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 .headline-accent {
  color: var(--red);
  background: linear-gradient(115deg, #ff8790 -4%, #ff3b51 44%, #d51b38 96%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px #f91f3d19);
}
.hero-description { color: #abb4c4; font-size: 1.0625rem; max-width: 405px; }
.hero-actions { gap: 14px; margin-top: 32px; }
.hero-actions .button { min-height: 56px; }
.techline { margin-top: 26px; gap: 8px; font-size: .75rem; }
.techline span {
  padding: 5px 10px;
  background: #171d2870;
  border: 1px solid #818ea42b;
  border-radius: 4px;
  color: #adb8ca;
}
.techline span + span::before { content: none; }
.hero-visual { height: 565px; width: calc(100% + 30px); margin-left: 18px; perspective: 1600px; }
.hero-visual::before {
  content: '';
  position: absolute;
  inset: -10% -18% -4% -12%;
  z-index: -2;
  background-image: linear-gradient(#a4b1c912 1px, transparent 1px),
                    linear-gradient(90deg, #a4b1c912 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 52% 48%, #000b 8%, transparent 69%);
  -webkit-mask-image: radial-gradient(ellipse at 52% 48%, #000b 8%, transparent 69%);
  pointer-events: none;
}
.hero-glow {
  inset: -1% -20% -4% -15%;
  z-index: -1;
  background: radial-gradient(ellipse at 57% 51%, #ca173348, #760e221c 42%, transparent 70%);
  pointer-events: none;
}
.hero-glow::after {
  content: '';
  position: absolute;
  left: 4%;
  right: 2%;
  top: 59%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ff4a6590 48%, transparent);
  box-shadow: 0 0 25px 2px #ff1f4327;
  transform: rotate(-8deg);
}
.orbit-one { width: 120%; height: 69%; left: -3%; top: 12%; transform: rotate(-22deg); border-color: #ff586b19; }
.orbit-two { display: none; }
.hero-window {
  border: 1px solid #aab8d13d;
  border-radius: 10px;
  background: #111720;
  box-shadow: 0 30px 60px #0009, 0 1px 0 #dfe8ff16 inset;
  transition: transform .3s ease, border-color .3s, box-shadow .3s, filter .3s;
}
.hero-window:hover { border-color: #e1e8f094; box-shadow: 0 30px 80px #000b, 0 0 28px #e52b4026; }
.window-back { width: 75%; right: 0; top: 4%; transform: rotate(2deg); filter: brightness(.72); }
.window-back:hover { transform: translateY(-5px) rotate(1deg); filter: brightness(.93); }
.window-main {
  width: 98%;
  top: 23%;
  left: -2%;
  transform: rotate(-1.5deg);
  border-color: #c2cde257;
  box-shadow: 0 30px 70px #000b, 0 0 45px #de24332b, 0 1px 0 #e4edff22 inset;
}
.window-main:hover { transform: translateY(-6px) rotate(-.5deg); }
.window-front { width: 63%; right: -1%; bottom: 0; transform: rotate(2deg); }
.window-front:hover { transform: translateY(-5px) rotate(1deg); }
.hero-caption { bottom: 2%; left: 0; transform: none; letter-spacing: .06em; font-size: .75rem; color: #95a2b8; }
.caption-rule { background: #fe3a52; box-shadow: 0 0 9px #fe3a5260; }
.hero-bottom { border-color: #8792a528; color: #a0aabb; padding-block: 21px; }
.hero-bottom > a { color: #c1ccdd; }

.performance {
  background: linear-gradient(180deg, #141a23a6, #0c1016ed);
  border-top: 1px solid #a6b2c42f;
  border-bottom: 1px solid #8894ac22;
  padding-block: 36px 22px;
}
.stats-grid { gap: 0; }
.stat { position: relative; border-right-color: #8999b128; padding: 8px 36px 9px; gap: 6px; }
.stat::before { content: ''; display: block; height: 2px; width: 23px; margin-bottom: 14px; background: #f64155; box-shadow: 0 0 13px #ff2b4555; }
.stat-value { font-family: var(--display); font-size: 3rem; font-weight: 500; letter-spacing: -.065em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-value .unit { font-size: 1.2rem; margin-left: 7px; color: #afb9ca; letter-spacing: -.02em; }
.stat-value.red-text .unit { color: #ed6b7d; }
.stat-label { color: #a8b3c5; font-size: .875rem; }
.stat-note { color: #8b96a8; font-size: .75rem; margin-top: 24px; }

.section { padding-block: 100px; }
.features-section { background: linear-gradient(180deg, #080a0d, #0c1016); }
.section-heading { margin-bottom: 46px; }
h2 { font-weight: 500; font-size: 2.65rem; line-height: 1.22; letter-spacing: -.055em; }
.muted-heading { color: #919eb3; }
.section-heading > p { color: #a3aec1; line-height: 1.85; }
.feature-grid { gap: 22px; }
.feature-card {
  border: 1px solid transparent;
  border-radius: 14px;
  background: linear-gradient(145deg, #1b212bec, #10151cec 68%) padding-box,
              linear-gradient(145deg, #707e945e, #2b364633 48%, #65708430) border-box;
  box-shadow: 0 14px 32px #0002;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature-card:hover { transform: translateY(-4px); border-color: #69768a66; box-shadow: 0 20px 40px #0004; }
.feature-topline { color: #8c9bb1; margin-bottom: 23px; }
.feature-icon { width: 34px; height: 34px; padding: 6px; background: linear-gradient(145deg, #92283a30, #47182622); border: 1px solid #e4415940; border-radius: 7px; }
.feature-card h3 { font-size: 1.375rem; line-height: 1.3; font-weight: 500; letter-spacing: -.035em; }
.feature-card p { color: #a5b0c3; font-size: 1rem; }
.architecture { border-color: #ee4a623c; border-radius: 8px; background: #11131be0; box-shadow: 0 0 25px #b1183010; }
.architecture-label { background: linear-gradient(90deg, #4a1d2a99, #291b2580); color: #d6dfe9; border-bottom: 1px solid #ee4a621e; }
.architecture-parts { color: #b8c3d4; padding-block: 18px; }
.architecture-label > span:last-child { color: #c299a6; }
.feature-shot { opacity: .88; transition: opacity .25s; }
.feature-shot:hover { opacity: 1; }
.tabs-detail { border-color: #8a9ab33b; }

.apps-section { background: radial-gradient(ellipse at 48% 66%, #4f18231c, transparent 65%), #0a0e14; border-top-color: #91a0ba24; }
.apps-section h2 { font-size: 3.3rem; }
.app-explorer {
  border: 1px solid transparent;
  border-radius: 16px;
  background: linear-gradient(145deg, #171e28, #0f141d 70%) padding-box,
              linear-gradient(125deg, #a2b5d673, #48576e38 35%, #af3e5250 78%, #8593ab59) border-box;
  box-shadow: 0 35px 100px #0006, 0 0 75px #dc21421a;
}
.app-tabs { padding: 10px; gap: 7px; background: #080c1399; border-color: #8598b52a; }
.app-tabs button { padding: 17px 7px; border: 1px solid transparent; border-radius: 7px; color: #a5b3c9; font-size: .875rem; }
.app-tabs button:hover { background: #8aa2cc0b; color: #f4f6fa; border-color: #b0c1df22; }
.app-tabs button[aria-selected=true] {
  border-color: #f552696e;
  color: #fff;
  background: linear-gradient(145deg, #57223280, #261c29b3);
  box-shadow: inset 0 1px 0 #ff99a71a, 0 2px 13px #b1183026;
}
.app-panel { padding: 34px 34px 0; }
.app-kicker { color: #ff6f81; font-size: .75rem; letter-spacing: .12em; }
.app-description h3 { font-weight: 500; font-size: 1.8rem; letter-spacing: -.045em; }
.app-description p { font-size: 1rem; color: #aab5c8; }
.app-description li { color: #b8c5da; font-size: .875rem; }
.app-description li::before { width: 5px; height: 5px; background: #ff4c68; }
.app-screenshot { border: 1px solid #b5c1d43b; border-radius: 9px; box-shadow: 0 15px 35px #0005; }
.app-screenshot:hover > img { filter: brightness(.92); }
.expand-label { background: #111926ed; border-color: #a7b7d364; color: #e4ecf9; }
.gallery-footer { color: #99a7bd; padding-block: 19px; font-size: .75rem; }
.gallery-footer > span:last-child { font-variant-numeric: tabular-nums; color: #d0dcec; }

.install-section {
  padding-block: 94px;
  background: radial-gradient(ellipse at 81% 59%, #9a183a35, transparent 54%),
              radial-gradient(ellipse at 12% 110%, #6e172620, transparent 65%),
              linear-gradient(155deg, #151a24, #090d14 75%);
  border-top: 1px solid #dd476143;
  border-bottom: 1px solid #788caa2b;
}
.install-section::after { border-color: #bd3e5829; inset: -150% -15% -150% 50%; transform: rotate(-28deg); }
.install-section .eyebrow { color: #b8c6dd; }
.install-section .section-number { color: var(--red); }
.install-section h2 { font-size: 3.85rem; font-weight: 500; }
.install-section h2 span { color: #ff4f67; text-shadow: 0 0 40px #d92a4733; }
.install-section p { color: #afbad0; }
.button-light { color: #fff; background: linear-gradient(180deg, #f43c51, #d3273d); border: 1px solid #ff97a460; box-shadow: inset 0 1px 0 #ffc6d133, 0 7px 25px #de28482b; }
.button-light:hover { color: #fff; background: linear-gradient(180deg, #ff4c66, #e42f49); box-shadow: 0 8px 30px #ed324742; }
.button-glass { background: #29314240; border-color: #8494b050; color: #e6ecf8; }
.button-glass:hover { background: #34405470; border-color: #a2b3cd; }
.source-card {
  border: 1px solid transparent;
  border-radius: 14px;
  background: linear-gradient(145deg, #272a3980, #121720a6) padding-box,
              linear-gradient(125deg, #bd91a85e, #7f91b626, #b038543f) border-box;
  box-shadow: 0 24px 45px #0003;
  backdrop-filter: blur(12px);
}
.source-card:hover { border-color: #c5758b83; background: #272233b3; }
.source-card h3 { font-size: 1.5rem; font-weight: 500; }
.source-card p { font-size: 1rem; }
.repo-name { color: #bfcce1; border-color: #9baccb26; }
.site-footer { background: #080a0d; }
.footer-inner p, .footer-inner nav { color: #99a6bc; }
.image-dialog { border-color: #8295b467; border-radius: 14px; background: #101620; box-shadow: 0 30px 150px #000c, 0 0 90px #ee28421a; }
.image-dialog::backdrop { background: #03050ae8; backdrop-filter: blur(15px); }
.dialog-bar { background: linear-gradient(100deg, #202837, #111923); border-color: #8193b13b; }
.dialog-footer { color: #a8b7cc; }

@media (min-width: 1600px) {
  .hero-grid { min-height: 755px; }
  .hero h1 { font-size: 5.4rem; }
  .hero-visual { height: 590px; width: calc(100% + 65px); }
}
@media (max-width: 1190px) {
  .desktop-nav { gap: 21px; }
  .nav-actions { gap: 12px; }
  .nav-actions > .github-link { padding-inline: 16px; }
  .nav-actions > .button-small { padding-inline: 17px; }
  .hero-grid { grid-template-columns: 45% 55%; min-height: 675px; padding-block: 26.5px 53px; }
  .hero h1 { font-size: clamp(3.4rem, 6.05vw, 4.55rem); }
  .hero-visual { height: 477px; width: calc(100% + 8px); margin-left: 22px; }
  .window-back { top: 9%; }
  .window-main { top: 25%; }
  .window-front { bottom: 6%; width: 66%; }
  .hero-caption { bottom: 7%; font-size: .75rem; }
  .hero-description { font-size: 1rem; max-width: 365px; }
  .hero-actions { gap: 11px; }
  .stat { padding-inline: 25px; }
  .stat-value { font-size: 2.65rem; }
  .stat-value .unit { font-size: 1.0625rem; }
  .section { padding-block: 82px; }
  h2 { font-size: 2.3rem; }
  .section-heading > p { font-size: 1rem; }
  .feature-grid { gap: 16px; }
  .feature-card { padding-inline: 22px; }
  .feature-card h3 { font-size: 1.25rem; }
  .app-tabs { gap: 3px; padding: 8px; }
  .app-tabs button { gap: 6px; padding-inline: 5px; }
  .app-tabs button .icon { width: 17px; height: 17px; }
  .install-section h2 { font-size: 3.25rem; }
}
@media (max-width: 1020px) and (min-width: 901px) {
  .nav-shell { gap: 18px; }
  .desktop-nav { gap: 17px; }
  .nav-actions > .button-small { font-size: .8125rem; padding-inline: 14px; }
  .nav-actions > .github-link { font-size: .9375rem; padding-inline: 14px; gap: 9px; }
}
@media (max-width: 900px) {
  .desktop-nav { gap: 20px; }
  .github-link span { display: inline; }
  .nav-actions > .button-small { display: none; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; padding-block: 54px 14px; gap: 26px; }
  .hero-copy { max-width: 690px; }
  .hero-copy h1 { font-size: clamp(3.75rem, 9.4vw, 5rem); line-height: 1.06; }
  .hero-description { max-width: 580px; font-size: 1.0625rem; }
  .hero-visual { width: min(710px, 96%); height: 487px; margin: 0 auto 14px; }
  .window-back { top: 1%; right: 0; width: 73%; }
  .window-main { top: 19%; left: 0; width: 96%; }
  .window-front { bottom: 0; right: 0; width: 60%; }
  .hero-caption { bottom: 3%; left: 1%; }
  .stat { padding-inline: 20px; }
  .stat-value { font-size: 2.3rem; }
  .stat-value .unit { font-size: 1rem; margin-left: 5px; }
  .stat-label { font-size: .875rem; }
  h2 { font-size: 2rem; }
  .section-heading > p { max-width: 255px; }
  .feature-card:last-child { padding-right: 53%; }
  .app-tabs { gap: 6px; }
  .app-tabs button { padding: 16px; }
  .app-panel { padding: 28px 24px 0; }
  .install-section h2 { font-size: 3rem; }
  .source-card h3 { font-size: 1.375rem; }
}
@media (max-width: 720px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
  .mobile-nav {
    position: absolute;
    display: flex;
    flex-direction: column;
    left: 0;
    right: 0;
    top: 88px;
    padding: 12px 32px 19px;
    background: #111721f5;
    border-bottom: 1px solid #63748e55;
    box-shadow: 0 24px 40px #0008;
    backdrop-filter: blur(18px);
  }
  .mobile-nav a { padding: 12px 3px; font-size: 1rem; color: #d0daeb; }
  .menu-toggle[aria-expanded=true] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded=true] span:last-child { transform: translateY(-4px) rotate(-45deg); }
}
@media (max-width: 600px) {
  .site-header { height: 76px; }
  .nav-shell { gap: 14px; }
  .nav-actions { gap: 9px; }
  .nav-actions > .github-link { display: inline-flex; min-height: 42px; padding: 10px 13px; gap: 8px; font-size: .875rem; border-radius: 8px; }
  .github-link .icon { width: 19px; height: 19px; }
  .github-link span { display: inline; }
  .mobile-nav { top: 76px; padding-inline: 20px; }
  .hero-grid { padding-top: 42px; padding-bottom: 0; gap: 22px; }
  .eyebrow { font-size: .75rem; letter-spacing: .075em; }
  .hero-copy h1 { font-size: clamp(3rem, 10.95vw, 4rem); letter-spacing: -.07em; line-height: 1.09; margin-block: 22px 25px; }
  .hero-description { font-size: 1rem; max-width: 365px; }
  .hero-actions { margin-top: 27px; gap: 11px; flex-wrap: wrap; }
  .hero-actions .button { min-height: 51px; }
  .techline { gap: 6px; font-size: .75rem; margin-top: 23px; }
  .techline span { padding: 4px 8px; }
  .hero-visual { height: clamp(283px, 76vw, 420px); width: 100%; margin-top: 0; margin-bottom: 9px; }
  .hero-visual::before { background-size: 34px 34px; }
  .window-back { top: 4%; right: 0; width: 74%; transform: rotate(2deg); }
  .window-main { top: 22%; width: 98%; left: 0; transform: rotate(-1.5deg); }
  .window-front { bottom: 3%; right: 0; width: 62%; transform: rotate(2deg); }
  .hero-window { border-radius: 6px; }
  .hero-caption { font-size: .75rem; letter-spacing: .015em; line-height: 1.5; bottom: 4%; left: 0; max-width: 34%; }
  .hero-bottom { padding-block: 18px; font-size: .75rem; }
  .hero-bottom > a { font-size: .75rem; }
  .performance { padding-block: 21px 20px; }
  .stat { padding-top: 20px !important; padding-bottom: 23px !important; }
  .stat:nth-child(odd), .stat:nth-child(-n+2) { border-color: #8999b128; }
  .stat::before { margin-bottom: 12px; width: 20px; }
  .stat-value { font-size: 2.375rem; }
  .stat-value .unit { font-size: 1rem; }
  .stat-label { font-size: .875rem; }
  .stat-note { font-size: .75rem; line-height: 1.65; margin-top: 20px; }
  .section { padding-block: 66px; }
  .section-heading { margin-bottom: 31px; }
  h2 { font-size: clamp(1.85rem, 6.8vw, 2.2rem); letter-spacing: -.055em; }
  .section-heading > p { max-width: 355px; font-size: 1rem; }
  .feature-grid { gap: 19px; }
  .feature-card { padding: 26px 24px 0; min-height: 348px; }
  .feature-card:last-child { padding: 26px 24px 0; min-height: 338px; }
  .feature-card h3 { font-size: 1.4rem; }
  .feature-card p { font-size: 1rem; }
  .architecture-parts { font-size: .75rem; }
  .apps-section h2 { font-size: 2.8rem; }
  .app-explorer { border-radius: 12px; }
  .app-tabs { padding: 8px; gap: 6px; }
  .app-tabs button { padding: 14px 13px; gap: 8px; }
  .app-panel { padding: 24px 13px 0; }
  .app-description { min-height: 179px; margin-bottom: 24px; }
  .app-description h3 { font-size: 1.65rem; }
  .app-description p { font-size: 1rem; }
  .app-screenshot { border-radius: 5px; }
  .gallery-footer { font-size: .75rem; padding-block: 16px; }
  .install-section { padding-block: 65px; }
  .install-section h2 { font-size: 3rem; }
  .install-section p { font-size: 1rem; }
  .source-card { padding: 28px; }
  .source-card h3 { font-size: 1.55rem; }
  .footer-inner p { font-size: .75rem; }
}
@media (max-width: 360px) {
  .nav-shell { gap: 8px; }
  .brand { gap: 7px; font-size: 19px; }
  .nav-actions { gap: 4px; }
  .nav-actions > .github-link { padding-inline: 10px; gap: 6px; }
  .menu-toggle { width: 30px; padding-inline: 5px; }
  .hero-copy h1 { font-size: 2.95rem; }
  .hero-caption { display: none; }
  .app-description { min-height: 219px; }
}
/* Compact actions retain their text size and original button styling. */
main .button, .install-actions .button { min-height: 43px; padding-block: 10px; }
.hero-actions .button { min-height: 45px; }
.nav-actions > .github-link,
.nav-actions > .button-small { min-height: 42px; padding-block: 9px; }
.desktop-nav a { padding-block: 9px; }
.menu-toggle { height: 35px; }
.app-tabs button { padding-block: 11.5px; }
.gallery-footer { flex-wrap: wrap; gap: 12px 20px; }
.gallery-controls { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.gallery-controls #app-counter { color: #d0dcec; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gallery-playback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #8193b14f;
  border-radius: 6px;
  background: #202a3a70;
  color: #d2ddef;
  font-family: var(--body);
  font-size: .875rem;
  line-height: 1.35;
  transition: background .2s, border-color .2s;
}
.gallery-playback:hover { background: #30384b; border-color: #b2c3e480; }
.gallery-playback .icon { width: 15px; height: 15px; }
.gallery-playback[hidden] { display: none; }
.app-description { min-height: 144px; }
.app-description, .app-screenshot { backface-visibility: hidden; }

/* A full-width installation terminal, with the existing compact actions. */
.install-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; }
.install-inner > * { min-width: 0; }
.install-heading { text-align: center; }
.install-heading .eyebrow { justify-content: center; }
.install-heading h2 { font-size: clamp(2.65rem, 5vw, 3.85rem); margin-top: 18px; }
.install-heading p { margin-top: 17px; }
.install-terminal {
  overflow: hidden;
  border: 1px solid #8593ab4d;
  border-radius: 14px;
  background: linear-gradient(145deg, #1b2029, #11151c 75%);
  box-shadow: 0 24px 65px #0005, 0 0 50px #d6284210, inset 0 1px 0 #ffffff08;
}
.install-terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 16px 26px;
  border-bottom: 1px solid #8997ae26;
  background: #ffffff02;
}
.terminal-label { color: #acb7ca; font-size: .9375rem; }
.copy-command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 43px;
  min-width: 155px;
  padding: 10px 15px;
  border: 1px solid #8494b050;
  border-radius: 8px;
  background: #29314240;
  color: #e6ecf8;
  font-size: .875rem;
  line-height: 1.4;
  white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.copy-command:hover { background: #34405470; border-color: #a2b3cd; }
.copy-command[hidden] { display: none; }
.copy-command .icon { width: 17px; height: 17px; }
.install-command {
  display: flex;
  gap: 17px;
  margin: 0;
  padding: 34px 32px 19px;
  overflow-x: auto;
  font: clamp(.875rem, 1.6vw, 1.125rem)/1.8 var(--mono);
  white-space: pre;
  scrollbar-width: thin;
}
.install-command:focus-visible { outline-offset: -4px; }
.install-command code { flex: none; font: inherit; color: #edf2fa; }
.terminal-prompt { flex: none; color: #ff5f72; user-select: none; }
.install-section .install-copy-status {
  min-height: 44px;
  margin: 0;
  padding: 0 32px 20px;
  color: #b6c3d8;
  font-size: .8125rem;
  line-height: 1.6;
}
.install-resources { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.install-resources .install-actions { margin: 0; flex-wrap: wrap; }
.install-source-link { display: inline-flex; align-items: center; gap: 13px; color: #dbe3f1; font-size: .9375rem; }
.install-source-link > .icon { width: 26px; height: 26px; }
.install-source-link:hover { color: #ff8b9c; }
.install-repo-name { display: block; margin-top: 2px; color: #98a8c0; font: .75rem/1.6 var(--mono); }
.install-source-arrow { margin-left: 6px; font-size: 1.25rem; color: #a8b8d0; }
@media (max-width: 600px) {
  .install-inner { gap: 27px; }
  .install-heading p { max-width: 290px; margin-inline: auto; }
  .install-terminal { border-radius: 11px; }
  .install-terminal-bar { min-height: 66px; padding: 13px 16px; gap: 10px; }
  .terminal-label { font-size: .875rem; }
  .copy-command { min-height: 39px; min-width: 142px; padding: 8px 12px; gap: 7px; }
  .install-command { padding: 26px 18px 16px; gap: 12px; font-size: .875rem; }
  .install-section .install-copy-status { padding-inline: 18px; }
  .install-resources { align-items: flex-start; flex-direction: column; gap: 28px; }
  .install-source-link { padding-top: 4px; }
}

/* A desktop with fixed wallpaper/taskbar and independently movable windows. */
@media (min-width: 901px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
  }
  .hero h1 { font-size: clamp(2.7rem, 4.6vw, 4.6rem); }
  .hero-actions { flex-wrap: wrap; }
}
.hero-visual.desktop-preview {
  width: 100%;
  height: auto;
  margin: 0;
  padding-left: 18px;
  perspective: none;
}
.hero-visual.desktop-preview::before { content: none; }
.desktop-themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.theme-option {
  --swatch-wall: #430e1a;
  --swatch-window: #262b32;
  --swatch-accent: #f33c54;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 11px;
  border: 1px solid #8494b02b;
  border-radius: 10px;
  background: linear-gradient(145deg, #1b222c, #11161e);
  text-align: left;
  box-shadow: inset 0 1px 0 #ffffff05;
  transition: border-color .2s, background .2s;
}
.theme-option[aria-pressed="true"] {
  border-color: #f34b6577;
  background: linear-gradient(135deg, #4c202d99, #201923);
  box-shadow: inset 0 1px 0 #ffb2c00b, 0 3px 18px #e92c4212;
}
.theme-option[aria-pressed="true"]:hover { border-color: #ff7893b3; }
.theme-swatch {
  position: relative;
  display: block;
  flex: 0 0 34px;
  width: 34px;
  height: 29px;
  overflow: hidden;
  border: 1px solid #ffffff29;
  border-radius: 5px;
  background: radial-gradient(ellipse at 0 100%, var(--swatch-accent), transparent 80%), var(--swatch-wall);
  box-shadow: 0 3px 8px #0003;
}
.theme-swatch::before, .theme-swatch::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 15px;
  border: 1px solid #ffffff38;
  border-top: 3px solid var(--swatch-accent);
  border-radius: 2px;
  background: var(--swatch-window);
}
.theme-swatch::before { top: 4px; left: 3px; }
.theme-swatch::after { top: 10px; left: 12px; }
.theme-copy { display: block; min-width: 0; }
.theme-name { display: block; color: #c7d0de; font-size: .8125rem; font-weight: 600; line-height: 1.3; }
.theme-meta { display: block; margin-top: 3px; color: #8290a5; font-size: .625rem; line-height: 1.4; white-space: nowrap; }
.theme-option[aria-pressed="true"] .theme-name { color: #fff; }
.theme-option[aria-pressed="true"] .theme-meta { color: #ff8e9d; }
.theme-check { position: absolute; top: 7px; right: 7px; width: 11px; height: 11px; color: #ff899c; }
.theme-light { --swatch-wall: #f7f9fc; --swatch-window: #ffffff; --swatch-accent: #0ea5a0; }
.theme-blackout { --swatch-wall: #101314; --swatch-window: #111516; --swatch-accent: #fbe301; }
.theme-blue { --swatch-wall: #070f1f; --swatch-window: #0d192b; --swatch-accent: #00d1ff; }
@media (min-width: 901px) and (max-width: 1190px), (max-width: 600px) {
  .theme-option { flex-direction: column; align-items: center; gap: 8px; padding: 10px 4px; text-align: center; }
  .theme-swatch { flex-basis: auto; }
  .theme-name { min-height: 2.6em; font-size: .75rem; }
  .theme-meta { font-size: .5625rem; }
}
.desktop-screen {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #8794aa55;
  border-radius: 10px;
  background: #120406 url('desktop-images/dark/wallpaper.png') center / cover;
  box-shadow: 0 28px 65px #0008, 0 0 60px #d928421a;
  user-select: none;
  -webkit-user-select: none;
}
.desktop-workspace { position: relative; min-height: 0; overflow: hidden; }
.desktop-window {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  box-shadow: 0 9px 24px #0008;
  cursor: grab;
  touch-action: none;
  -webkit-user-drag: none;
}
.desktop-window img { width: 100%; height: auto; border-radius: inherit; pointer-events: none; }
.desktop-window.is-awaiting-entrance { opacity: 0; }
.desktop-files { width: 65%; left: 4%; top: 12%; }
.desktop-settings { width: 49.2%; left: 50%; top: 4%; }
.desktop-screen[data-theme="blue"] .desktop-settings,
.desktop-screen[data-theme="blackout"] .desktop-settings,
.desktop-screen[data-theme="light"] .desktop-settings { width: 59.45%; }
.desktop-terminal { width: 60%; left: 24%; top: 53%; }
.desktop-terminal img { opacity: .9; }
.desktop-window.is-dragging { cursor: grabbing; }
.desktop-window:focus-visible { outline: 2px solid #ff7680; outline-offset: -2px; }
.desktop-taskbar { width: 100%; height: auto; pointer-events: none; }
.desktop-help { margin-top: 16px; color: #a3aec1; font-size: .75rem; text-align: center; }
@media (max-width: 900px) {
  .hero-visual.desktop-preview { width: min(710px, 100%); padding-left: 0; margin: 12px auto 20px; }
}
@media (max-width: 600px) {
  .desktop-screen { border-radius: 7px; }
  .desktop-help { font-size: .75rem; margin-top: 12px; }
}

/* Visibility is enhanced only after the scroll observer is installed. */
.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms cubic-bezier(.2,.7,.2,1), transform 650ms cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.motion-ready [data-reveal].is-revealed { opacity: 1; transform: none; }
.motion-ready [data-reveal].reveal-instant { transition: none; }
@media (max-width: 900px) {
  .app-tabs button { padding-block: 10.5px; }
  .app-description { min-height: 153px; }
}
@media (max-width: 600px) {
  main .button, .install-actions .button { min-height: 39px; padding-block: 8px; }
  .hero-actions .button { min-height: 41px; padding-block: 9px; }
  .nav-actions > .github-link { min-height: 37px; padding-block: 7px; }
  .mobile-nav a { padding-block: 9px; }
  .app-tabs button { padding-block: 9px; }
  .app-description { min-height: 230px; }
  .gallery-footer { gap: 13px; }
  .gallery-controls { gap: 13px; }
  .motion-ready [data-reveal] { transform: translateY(18px); }
  .motion-ready [data-reveal].is-revealed { transform: none; }
}
@media (max-width: 360px) {
  .app-description { min-height: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .motion-ready [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

.desktop-window[hidden], .theme-check[hidden] { display: none; }

/* Blackout uses floating shell controls instead of a bottom taskbar. */
.desktop-screen { position: relative; }
.desktop-screen[data-theme="blackout"] { grid-template-rows: minmax(0, 1fr); }
.desktop-dock, .desktop-topbar { position: absolute; z-index: 10; pointer-events: none; }
.desktop-dock { left: 1%; top: 50%; transform: translateY(-50%); height: 64%; width: auto; }
.desktop-topbar { top: 1%; right: 1%; width: 34%; aspect-ratio: 2138 / 429; overflow: hidden; }
.desktop-topbar img { display: block; width: 101.59%; height: auto; transform: translateY(-20.72%); }
.desktop-dock[hidden], .desktop-topbar[hidden], .desktop-taskbar[hidden] { display: none; }

.desktop-drag-hint {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 10px 16px;
  border: 1px solid #ffffff38;
  border-radius: 999px;
  background: #101722eb;
  box-shadow: 0 4px 20px #0006;
  color: #fff;
  font-size: .8125rem;
  white-space: nowrap;
  pointer-events: none;
}
.desktop-drag-hint[hidden] { display: none; }
